-
Home
-
Knit Pay
- Tips
How to Hide Knit Pay Admin Menus
function plt_hide_knit_pay_menus() {
//Hide "Tools → Scheduled Actions".
remove_submenu_page('tools.php', 'action-scheduler');
//Hide "Knit Pay".
remove_menu_page('pronamic_ideal');
//Hide "Knit Pay → Dashboard".
remove_submenu_page('pronamic_ideal', 'pronamic_ideal');
//Hide "Knit Pay → Payments".
remove_submenu_page('pronamic_ideal', 'edit.php?post_type=pronamic_payment');
//Hide "Knit Pay → Create Payment Link".
remove_submenu_page('pronamic_ideal', 'knit_pay_payment_link');
//Hide "Knit Pay → Reports".
remove_submenu_page('pronamic_ideal', 'pronamic_pay_reports');
//Hide "Knit Pay → Configurations".
remove_submenu_page('pronamic_ideal', 'edit.php?post_type=pronamic_gateway');
//Hide "Knit Pay → Settings".
remove_submenu_page('pronamic_ideal', 'pronamic_pay_settings');
//Hide "Knit Pay → Supported Extensions".
remove_submenu_page('pronamic_ideal', 'https://wordpress.org/plugins/knit-pay/#tab-description');
//Hide "Knit Pay → Supported Gateways".
remove_submenu_page('pronamic_ideal', 'https://wordpress.org/plugins/knit-pay/#tab-description');
//Hide "Knit Pay → Support".
remove_submenu_page('pronamic_ideal', 'https://www.knitpay.org/contact-us/?utm_source=knit-pay&utm_medium=ecommerce-module&utm_campaign=module-admin&utm_content=admin-menu');
//Hide "Knit Pay → Refer and Earn".
remove_submenu_page('pronamic_ideal', 'https://www.knitpay.org/contact-us/?utm_source=knit-pay&utm_medium=ecommerce-module&utm_campaign=module-admin&utm_content=admin-menu');
}
add_action('admin_menu', 'plt_hide_knit_pay_menus', 101);
Where do I put this code?
How to Hide the "Knit Pay Status" Dashboard Widget
function plt_hide_knit_pay_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Knit Pay Status" widget.
remove_meta_box('pronamic_pay_dashboard_status', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_knit_pay_dashboard_widgets', 20);