From a75691ebd179b05702d3c7fecfd903761309ab16 Mon Sep 17 00:00:00 2001 From: Peter Kiss Date: Mon, 29 Jul 2024 11:45:51 +0200 Subject: [PATCH] Only load editor script if block editor (#2837) --- includes/admin/class-wp-job-manager-admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-wp-job-manager-admin.php b/includes/admin/class-wp-job-manager-admin.php index 114dee6f0..3d955dcf5 100644 --- a/includes/admin/class-wp-job-manager-admin.php +++ b/includes/admin/class-wp-job-manager-admin.php @@ -135,7 +135,7 @@ public function admin_enqueue_scripts() { wp_enqueue_script( 'job_manager_admin_js' ); WP_Job_Manager::register_script( 'job_tags_upsell_js', 'js/admin/job-tags-upsell.js', [], true ); - if ( ! class_exists( 'WP_Job_Manager_Job_Tags' ) ) { + if ( ! class_exists( 'WP_Job_Manager_Job_Tags' ) && $screen->is_block_editor() ) { wp_enqueue_script( 'job_tags_upsell_js' ); }