update cap handling for new page controller
This commit is contained in:
parent
e68eaabaac
commit
15b3bd55ec
|
@ -142,12 +142,14 @@ class WC_Admin_Loader {
|
|||
* @todo The entry point for the embed needs moved to this class as well.
|
||||
*/
|
||||
public static function register_page_handler() {
|
||||
$analytics_cap = apply_filters( 'woocommerce_admin_analytics_menu_capability', 'view_woocommerce_reports' );
|
||||
wc_admin_register_page(
|
||||
array(
|
||||
'id' => 'woocommerce-dashboard', // Expected to be overridden if dashboard is enabled.
|
||||
'parent' => 'woocommerce',
|
||||
'title' => null,
|
||||
'path' => self::APP_ENTRY_POINT,
|
||||
'id' => 'woocommerce-dashboard', // Expected to be overridden if dashboard is enabled.
|
||||
'parent' => 'woocommerce',
|
||||
'title' => null,
|
||||
'path' => self::APP_ENTRY_POINT,
|
||||
'capability' => $analytics_cap,
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -398,7 +398,7 @@ class WC_Admin_Page_Controller {
|
|||
'id' => null,
|
||||
'parent' => null,
|
||||
'title' => '',
|
||||
'capability' => 'manage_options',
|
||||
'capability' => 'view_woocommerce_reports',
|
||||
'path' => '',
|
||||
'icon' => '',
|
||||
'position' => null,
|
||||
|
|
Loading…
Reference in New Issue