How to Hide the "WCSlack" Admin Menu

function plt_hide_wc_slack_menus() {
	//Hide the "Settings → WCSlack" menu.
	remove_submenu_page('options-general.php', 'wc-slack-options-page');
}

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

Where do I put this code?