How to Hide Competitive Pricing for WooCommerce and Google Shopping Admin Menus

function plt_hide_competitive_pricing_for_wc_and_gs_menus() {
	//Hide the "Product Pricing" menu.
	remove_menu_page('api-pp-dashboard');
	//Hide the "Product Pricing → Automations" menu.
	remove_submenu_page('api-pp-dashboard', 'api-pp-automations');
}

add_action('admin_menu', 'plt_hide_competitive_pricing_for_wc_and_gs_menus', 11);

Where do I put this code?