Title: Incorrect dependencies on wp_enqueue_script()
Last modified: March 10, 2025

---

# Incorrect dependencies on wp_enqueue_script()

 *  [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/incorrect-dependencies-on-wp_enqueue_script/)
 * Hello,
 * We have tracked the source of this bug down to your plugin …
 * > [10-Mar-2025 10:12:59 UTC] E_USER_NOTICE: Function wp_enqueue_script() was 
   > called incorrectly. “wp-editor” script should not be enqueued together with
   > the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see
   > Debugging in WordPress for more information. (This message was added in version
   > 5.8.0.) in /wp-includes/functions.php on line 6114
 * On line 91 your plugin uses `wp_enqueue_script()` to register the script but 
   nominates `wp-editor` as a dependency …
 *     ```wp-block-code
       add_action('init', 'block_logic_set_script_translations');function block_logic_enqueue_block_editor_assets(){	if (is_admin()) {		// Enqueue our script		wp_enqueue_script(			'block-logic',			esc_url(plugins_url('/build/js/block-logic.js', __FILE__)),			['wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor'],			'1.0.8',			false // Do not enqueue the script in the footer.		);		wp_enqueue_style(			'block-logic',			esc_url(plugins_url('/build/css/block-logic.css', __FILE__)),		);	}}
       ```
   
 * … when it should instead designate `wp-block-editor`. You may also need to update`/
   build/js/block-logic.js` accordingly.
 * When updating your plugin to be compatible with WordPress v5.8 and higher, would
   you please test against WordPress v6.9.2 and update the “tested-up-to” attribute
   of your readme.txt so that the WordPress plugin repository stops warning that
   your plugin “**hasn’t been tested with the latest 3 major releases of WordPress**”
   which makes your plugin very difficult for users to find and install as such 
   plugins are shown last in “Dashboard – Plugins – Add new plugin”.
 * Thank you,
 * Oliver

The topic ‘Incorrect dependencies on wp_enqueue_script()’ is closed to new replies.

 * ![](https://ps.w.org/block-logic/assets/icon.svg?rev=2227643)
 * [Block Logic - Full Block Display Control](https://wordpress.org/plugins/block-logic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/block-logic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/block-logic/)
 * [Active Topics](https://wordpress.org/support/plugin/block-logic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/block-logic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/block-logic/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/incorrect-dependencies-on-wp_enqueue_script/)
 * Status: not resolved