diff --git a/projects/packages/stats-admin/changelog/update-integration-jitm-in-stats b/projects/packages/stats-admin/changelog/update-integration-jitm-in-stats new file mode 100644 index 0000000000000..d9779842c1cc7 --- /dev/null +++ b/projects/packages/stats-admin/changelog/update-integration-jitm-in-stats @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +JITM: expose function to render message diff --git a/projects/packages/stats-admin/src/class-main.php b/projects/packages/stats-admin/src/class-main.php index 596b1d0608b15..66b53734e7b71 100644 --- a/projects/packages/stats-admin/src/class-main.php +++ b/projects/packages/stats-admin/src/class-main.php @@ -52,6 +52,19 @@ public static function init() { */ private function __construct() { add_action( 'rest_api_init', array( new REST_Controller(), 'register_rest_routes' ) ); + // Disable JITM assets on the Stats page. + // JITM is handled separately by Stats: https://github.com/Automattic/wp-calypso/pull/95273. + add_filter( + 'jetpack_display_jitms_on_screen', + function ( $show, $screen_id ) { + if ( 'jetpack_page_stats' === $screen_id ) { + return false; + } + return $show; + }, + 10, + 2 + ); } /**