-
Home
-
Paytium: Mollie payment forms & donations
- Tips
How to Hide Paytium Admin Menus
function plt_hide_paytium_menus() {
//Hide "Paytium".
remove_menu_page('paytium');
//Hide "Paytium → Payments".
remove_submenu_page('paytium', 'edit.php?post_type=pt_payment');
//Hide "Paytium → Settings".
remove_submenu_page('paytium', 'paytium');
//Hide "Paytium → Setup wizard".
remove_submenu_page('paytium', 'pt-setup-wizard');
//Hide "Paytium → Extra features".
remove_submenu_page('paytium', 'pt-extensions');
//Hide "Paytium → Pro versions".
remove_submenu_page('paytium', 'https://www.paytium.nl/prijzen/');
}
add_action('admin_menu', 'plt_hide_paytium_menus', 11);
Where do I put this code?
How to Hide Paytium Meta Boxes
function plt_hide_paytium_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Payment details" meta box.
remove_meta_box('pt_payment_details', $screen->id, 'normal');
//Hide the "Subscription first payment" meta box.
remove_meta_box('pt_subscription_first_payment', $screen->id, 'normal');
//Hide the "Payment items" meta box.
remove_meta_box('pt_payment_items', $screen->id, 'normal');
//Hide the "Customer details" meta box.
remove_meta_box('pt_customer_details', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_paytium_metaboxes', 20);