I am using the latest version of wp-ecommerce (3.89) and a new filter has been introduced to enable role based access to certain dashboard features such as the sales page or upgrade capability. However, the default role in the core file is currently set to "administrator".
What I would like to do is take the original filter and modify it by placing the modified code in my functions file to over-ride that.
So how to modify this: (from plugin file wp-ecommerce/wpsc-admin/admin.php
$purchase_logs_cap = apply_filters( 'wpsc_purchase_logs_cap', 'administrator' );
$page_hooks[] = $purchase_logs_page = add_submenu_page( 'index.php', __( 'Store Sales', 'wpsc' ), __( 'Store Sales', 'wpsc' ), $purchase_logs_cap, 'wpsc-purchase-logs', 'wpsc_display_purchase_logs_page' );
to something like this
remove_filter('wpsc_purchase_logs_cap', 'administrator');
function sh_wpsc_admin_pages($purchase_logs_cap) {
apply_filters( 'wpsc_purchase_logs_cap', 'editor' );
}