Tips on Customizing GA4WP

How to Hide GA4WP Admin Menus

function plt_hide_ga_for_wp_menus() {
	//Hide "GA4WP".
	remove_menu_page('ga4wp_pro_plugin_options');
	//Hide "GA4WP → GA4WP".
	remove_submenu_page('ga4wp_pro_plugin_options', 'ga4wp_pro_plugin_options');
	//Hide "GA4WP → Contact Us".
	remove_submenu_page('ga4wp_pro_plugin_options', 'ga4wp_pro_plugin_options-contact');
	//Hide "GA4WP → Upgrade".
	remove_submenu_page('ga4wp_pro_plugin_options', 'ga4wp_pro_plugin_options-pricing');
}

add_action('admin_menu', 'plt_hide_ga_for_wp_menus', 1000000000);

Where do I put this code?

How to Hide the "GA4WP Setup" Dashboard Widget

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

	//Remove the "GA4WP Setup" widget.
	remove_meta_box('ga4wp_status_widget_6', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_ga_for_wp_dashboard_widgets', 20);