Tips on Customizing WordPress eCommerce Plugin – Studiocart

How to Hide Studiocart Admin Menus

function plt_hide_studiocart_menus() {
	//Hide "Studiocart".
	remove_menu_page('studiocart');
	//Hide "Studiocart → Products".
	remove_submenu_page('studiocart', 'edit.php?post_type=sc_product');
	//Hide "Studiocart → Orders".
	remove_submenu_page('studiocart', 'edit.php?post_type=sc_order');
	//Hide "Studiocart → Subscriptions".
	remove_submenu_page('studiocart', 'edit.php?post_type=sc_subscription');
	//Hide "Studiocart → Categories".
	remove_submenu_page('studiocart', 'edit-tags.php?taxonomy=sc_product_cat');
	//Hide "Studiocart → Tags".
	remove_submenu_page('studiocart', 'edit-tags.php?taxonomy=sc_product_tag');
	//Hide "Studiocart → Settings".
	remove_submenu_page('studiocart', 'sc-admin');
	//Hide "Studiocart → Resources".
	remove_submenu_page('studiocart', 'sc-docs');
	//Hide "Studiocart → Reports".
	remove_submenu_page('studiocart', 'ncs-cart-reports');
	//Hide "Studiocart → Contacts".
	remove_submenu_page('studiocart', 'ncs-cart-contacts-page');
	//Hide "Studiocart → Affiliation".
	remove_submenu_page('studiocart', 'studiocart-affiliation');
	//Hide "Studiocart → Contact Us".
	remove_submenu_page('studiocart', 'studiocart-contact');
	//Hide "Studiocart → Upgrade".
	remove_submenu_page('studiocart', 'studiocart-pricing');
}

add_action('admin_menu', 'plt_hide_studiocart_menus', 1000000000);

Where do I put this code?

How to Hide Studiocart Meta Boxes

function plt_hide_studiocart_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "Product Settings" meta box.
	remove_meta_box('sc-product-settings', $screen->id, 'normal');
	//Hide the "Analytics" meta box.
	remove_meta_box('sc-product-reports', $screen->id, 'normal');
	//Hide the "Order Details" meta box.
	remove_meta_box('sc-edit-order-details', $screen->id, 'normal');
	//Hide the "Order Notes" meta box.
	remove_meta_box('sc-order-notes', $screen->id, 'side');
	//Hide the "Studiocart" meta box.
	remove_meta_box('sc-product', $screen->id, 'side');
}

add_action('add_meta_boxes', 'plt_hide_studiocart_metaboxes', 20);

How to Hide the "Monthly Overview for Studiocart" Dashboard Widget

function plt_hide_studiocart_dashboard_widgets() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Remove the "Monthly Overview for Studiocart" widget.
	remove_meta_box('studiocart_dashboard_widget', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_studiocart_dashboard_widgets', 20);