Remove Zapier notice on posts in Yoast SEO

Remove Zapier notice on posts in Yoast SEO on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_action( 'init', 'wp_remove_yoast_zapier_free_publishbox_text' );
function wp_remove_yoast_zapier_free_publishbox_text() {
	if ( class_exists( 'Yoast\WP\SEO\Integrations\Third_Party\Zapier_Free' ) ) {
		$zapier_free = YoastSEO()->classes->get( Yoast\WP\SEO\Integrations\Third_Party\Zapier_Free::class );
		remove_action( 'wpseo_publishbox_misc_actions', [ $zapier_free, 'add_publishbox_text' ] );
	}
}

The Zapier upsell nag will be removed in a future release of Yoast SEO.