-
Home
-
Paid Membership Subscriptions – Effortless Memberships, Recurring Payments & Content Restriction
- Tips
How to Hide Paid Member Subscriptions Admin Menus
function plt_hide_paid_member_subscriptions_menus() {
//Hide "Paid Member Subscriptions1".
remove_menu_page('paid-member-subscriptions');
//Hide "Paid Member Subscriptions1 → Dashboard".
remove_submenu_page('paid-member-subscriptions', 'pms-dashboard-page');
//Hide "Paid Member Subscriptions1 → Export Data".
remove_submenu_page('paid-member-subscriptions', 'pms-export-page');
//Hide "Paid Member Subscriptions1 → Import Data".
remove_submenu_page('paid-member-subscriptions', 'pms-import-page');
//Hide "Paid Member Subscriptions1 → Bulk Import Discount Codes".
remove_submenu_page('paid-member-subscriptions', 'pms-discount-codes-bulk-add');
//Hide "Paid Member Subscriptions1 → Basic Information".
remove_submenu_page('paid-member-subscriptions', 'pms-basic-info-page');
//Hide "Paid Member Subscriptions1 → Subscription Plans".
remove_submenu_page('paid-member-subscriptions', 'edit.php?post_type=pms-subscription');
//Hide "Paid Member Subscriptions1 → Members".
remove_submenu_page('paid-member-subscriptions', 'pms-members-page');
//Hide "Paid Member Subscriptions1 → Payments".
remove_submenu_page('paid-member-subscriptions', 'pms-payments-page');
//Hide "Paid Member Subscriptions1 → Discount Codes".
remove_submenu_page('paid-member-subscriptions', 'edit.php?post_type=pms-discount-codes');
//Hide "Paid Member Subscriptions1 → Reports".
remove_submenu_page('paid-member-subscriptions', 'pms-reports-page');
//Hide "Paid Member Subscriptions1 → Settings1".
remove_submenu_page('paid-member-subscriptions', 'pms-settings-page');
//Hide "Paid Member Subscriptions1 → Add-ons".
remove_submenu_page('paid-member-subscriptions', 'pms-addons-page');
}
add_action('admin_menu', 'plt_hide_paid_member_subscriptions_menus', 31);
Where do I put this code?
How to Hide the "Content Restriction" Meta Box
function plt_hide_paid_member_subscriptions_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Content Restriction" meta box.
remove_meta_box('pms_post_content_restriction', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_paid_member_subscriptions_metaboxes', 20);
How to Hide the "Paid Member Subscriptions Payments Summary" Dashboard Widget
function plt_hide_paid_member_subscriptions_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Paid Member Subscriptions Payments Summary" widget.
remove_meta_box('pms_payments_summary', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_paid_member_subscriptions_dashboard_widgets', 20);