mirror of
https://github.com/szepeviktor/wordpress-website-lifecycle.git
synced 2025-08-17 18:11:08 +08:00
WC: Hide Status page
This commit is contained in:
parent
714575871a
commit
deff5204d8
1 changed files with 13 additions and 0 deletions
|
@ -209,3 +209,16 @@ add_action(
|
|||
10,
|
||||
0
|
||||
);
|
||||
|
||||
// Hide Status page for users
|
||||
add_action(
|
||||
'admin_init',
|
||||
static function () {
|
||||
if (get_current_user_id() === 1) {
|
||||
return;
|
||||
}
|
||||
remove_submenu_page('woocommerce', 'wc-status');
|
||||
},
|
||||
10,
|
||||
0
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue