-
Home
-
Easy PayPal & Stripe Buy Now Button
- Tips
How to Hide Easy PayPal & Stripe Button Admin Menus
function plt_hide_wp_ecommerce_paypal_menus() {
//Hide the "PayPal & Stripe" menu.
remove_menu_page('wpecpp-settings');
//Hide the "PayPal & Stripe → Buttons" menu.
remove_submenu_page('wpecpp-settings', 'edit.php?post_type=wpplugin_pp_button');
//Hide the "PayPal & Stripe → Settings" menu.
remove_submenu_page('wpecpp-settings', 'wpecpp-settings');
}
add_action('admin_menu', 'plt_hide_wp_ecommerce_paypal_menus', 11);
Where do I put this code?
How to Hide Easy PayPal & Stripe Button Meta Boxes
function plt_hide_wp_ecommerce_paypal_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Button Settings" meta box.
remove_meta_box('wpecpp_price_box', $screen->id, 'normal');
//Hide the "Shortcode" meta box.
remove_meta_box('wpecpp_shortcode_box', $screen->id, 'side');
//Hide the "Save" meta box.
remove_meta_box('wpecpp_submitdiv', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_wp_ecommerce_paypal_metaboxes', 20);