Title: Notice: Function wp_enqueue_script() was called incorrectly.
Last modified: July 8, 2024

---

# Notice: Function wp_enqueue_script() was called incorrectly.

 *  Resolved [bandreas3](https://wordpress.org/support/users/bandreas3/)
 * (@bandreas3)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/notice-function-wp_enqueue_script-was-called-incorrectly-2/)
 * Hello. We receive this notice in the widgets editor when only WooCommerce is 
   activated on Twenty Twenty-Four theme.
 * **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 /opt/autelus_wordpress/staging/wp-
   includes/functions.php on line 6078**
   Please let us know how to resolve this.
   Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Shameem – a11n](https://wordpress.org/support/users/shameemreza/)
 * (@shameemreza)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/notice-function-wp_enqueue_script-was-called-incorrectly-2/#post-17877196)
 * Hi [@bandreas3](https://wordpress.org/support/users/bandreas3/)
 * This notice is a result of a conflict between the “wp-editor” script and the 
   new widgets editor. It’s likely that a plugin or the theme is enqueuing the “
   wp-editor” script where it shouldn’t be.
 * I attempted to reproduce the error on my own site, where I’m using Twenty Twenty-
   Four and WooCommerce exclusively, but had no luck. I even inspected the error
   log and activated WP Debug, yet the warning didn’t appear.
 * To ensure we’re on the same page, have you added any customization or custom 
   code to your site? For better assistance, please can you share a copy of the 
   following:
    - **System Status Report:** Navigate to **WooCommerce → Status**. Select **Get
      System Report** and then **Download for Support**.
    - **Fatal Error log:** Share a copy of any fatal error log found under **WooCommerce
      → Status → Logs**.
 * You could copy and paste your reply or share it via [Mozilla Community Pastebin](https://paste.mozilla.org/)
   and share the link here. Feel free to redact all the private information and 
   database tables before sending it over.
 * Looking forward to hearing from you!
 *  Thread Starter [bandreas3](https://wordpress.org/support/users/bandreas3/)
 * (@bandreas3)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/notice-function-wp_enqueue_script-was-called-incorrectly-2/#post-17878640)
 * Thank you for your responses. I was able to re-clone production and this appears
   to have resolved our issues. Have a great day!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Notice: Function wp_enqueue_script() was called incorrectly.’ is closed
to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bandreas3](https://wordpress.org/support/users/bandreas3/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/notice-function-wp_enqueue_script-was-called-incorrectly-2/#post-17878640)
 * Status: resolved