Tips on Customizing OpenAI Tools for WordPress & WooCommerce

How to Hide the "AI Server" Admin Menu

function plt_hide_openai_tools_for_wp_wc_menus() {
	//Hide the "Settings → AI Server" menu.
	remove_submenu_page('options-general.php', 'ai-tools-settings');

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

Where do I put this code?

How to Hide OpenAI Tools Meta Boxes

function plt_hide_openai_tools_for_wp_wc_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {

	//Hide the "AI Commenter" meta box.
	remove_meta_box('openai_post_comment_generator', $screen->id, 'side');
	//Hide the "AI Reviewer" meta box.
	remove_meta_box('ai_reviwer', $screen->id, 'side');

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