Tips on Customizing Schema & Structured Data for WP & AMP

How to Hide Schema & Structured Data for WP & AMP Admin Menus

function plt_hide_schema_and_structured_data_for_wp_menus() {
	//Hide "Structured Data".
	remove_menu_page('edit.php?post_type=saswp');
	//Hide "Structured Data → Schema Types".
	remove_submenu_page('edit.php?post_type=saswp', 'edit.php?post_type=saswp');
	//Hide "Structured Data → Reviews".
	remove_submenu_page('edit.php?post_type=saswp', 'edit.php?post_type=saswp_reviews');
	//Hide "Structured Data → Settings".
	remove_submenu_page('edit.php?post_type=saswp', 'structured_data_options');
	//Hide "Structured Data → Upgrade To Premium".
	remove_submenu_page('edit.php?post_type=saswp', 'structured_data_premium');
	//Hide "Structured Data →".
	remove_submenu_page('edit.php?post_type=saswp', 'collection');
}

add_action('admin_menu', 'plt_hide_schema_and_structured_data_for_wp_menus', 21);

Where do I put this code?

How to Hide Schema & Structured Data for WP & AMP Meta Boxes

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

	//Hide the "Schema  Structured Data on this post" meta box.
	remove_meta_box('saswp_post_specific', $screen->id, 'advanced');
	//Hide the "Reviews form Shortcode" meta box.
	remove_meta_box('saswp_reviews_form', $screen->id, 'side');
	//Hide the "Publish" meta box.
	remove_meta_box('saswp_submitdiv', $screen->id, 'side');
	//Hide the "Review Content" meta box.
	remove_meta_box('saswp_review_content', $screen->id, 'normal');
	//Hide the "Schema Type" meta box.
	remove_meta_box('saswp_schema_type', $screen->id, 'normal');
	//Hide the "Placement" meta box.
	remove_meta_box('saswp_amp_select', $screen->id, 'normal');
	//Hide the "Help" meta box.
	remove_meta_box('saswp_help_meta_box', $screen->id, 'side');
	//Hide the "Advance Schema Options" meta box.
	remove_meta_box('saswp_schema_options', $screen->id, 'advanced');
}

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