How to Hide PageLayer Admin Menus

function plt_hide_pagelayer_menus() {
	//Hide "Pagelayer".
	remove_menu_page('pagelayer');
	//Hide "Pagelayer → Settings".
	remove_submenu_page('pagelayer', 'pagelayer');
	//Hide "Pagelayer → Go Pro".
	remove_submenu_page('pagelayer', 'https://pagelayer.com/pricing?from=plugin');
	//Hide "Pagelayer → License".
	remove_submenu_page('pagelayer', 'pagelayer_license');
}

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

Where do I put this code?