Last active
November 22, 2022 13:34
-
-
Save WillBrubaker/7edd45085b7666a13f53 to your computer and use it in GitHub Desktop.
Remove WooCommerce submenu items for Shop Managers
could you check the link http://prntscr.com/mmmp9w ..? I cann't remove "pdf invoice" sub menu. i've added code below. please help me
`function wooninja_remove_items() {
$remove = array( 'wc-settings', 'wc-status', 'wc-addons','wwpp-wholesale-roles-page','shop_coupon','wpo_wcpdf_options_page', );
foreach ( $remove as $submenu_slug ) {
if ( ! current_user_can( 'update_core' ) ) {
remove_submenu_page( 'woocommerce', $submenu_slug );
}
}
}
add_action( 'admin_menu', 'wooninja_remove_items', 99, 0 );`
good and perfect!
really helpful!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
great task...................