Title: Function WP_Scripts::add was called incorrectly
Last modified: February 9, 2026

---

# Function WP_Scripts::add was called incorrectly

 *  Resolved [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-2/)
 * Since WordPress v6.9.1 detection was added for when scripts are enqueued with
   dependencies that are not registered and your plugin generates the following 
   error notice …
 *     ```wp-block-code
       [09-Feb-2026 19:12:13 UTC] E_USER_NOTICE: Function WP_Scripts::add was called incorrectly. The script with the handle "hcaptcha-cf7" was enqueued with dependencies that are not registered: hcaptcha. Please see Debugging in WordPress for more information. (This message was added in version 6.9.1.) in /wp-includes/functions.php on line 6131
       ```
   
 * This can easily be replicated on a clean install of WordPress …
    1. Install [Contact Form 7](https://en-gb.wordpress.org/plugins/contact-form-7/)
       plugin
    2. Install hCaptcha for WP
    3. In “Dashboard – hCaptcha – Integrations” enable “Contact Form 7 – Form Auto-
       Add” and click “Save Changes”
    4. Note that “Contact Form 7 – Live Form in Admin” is not required to be enabled
       to see this error
    5. Go to “Dashboard – Contact – Contact form 1 – Edit”
    6. The above error will be found in the PHP error log

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

 *  Plugin Contributor [kaggdesign](https://wordpress.org/support/users/kaggdesign/)
 * (@kaggdesign)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-2/#post-18816327)
 * Thank you for reporting. It is a valid case.
 * I have fixed it, and it will be released with v4.24.0 at the beginning of March.
 *  Thread Starter [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-2/#post-18816371)
 * Fantastic, thank you.
 * Oliver
 *  Plugin Contributor [kaggdesign](https://wordpress.org/support/users/kaggdesign/)
 * (@kaggdesign)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-2/#post-18818375)
 * Could you check the [v4.24.0-RC1](https://drive.google.com/file/d/1JdJl2BQ-tSxNrvS56lUgHpFZim6Rj2K5/view?usp=sharing)
   version of the plugin and let me know if the issue is resolved?
 * Thanks.
    -  This reply was modified 3 months, 2 weeks ago by [kaggdesign](https://wordpress.org/support/users/kaggdesign/).
 *  Thread Starter [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-2/#post-18819095)
 * Hi, yes, that seems to have silenced the error notice, thank you.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffunction-wp_scriptsadd-was-called-incorrectly-2%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/hcaptcha-for-forms-and-more/assets/icon.svg?rev=3026321)
 * [hCaptcha for WP](https://wordpress.org/plugins/hcaptcha-for-forms-and-more/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hcaptcha-for-forms-and-more/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/)
 * [Active Topics](https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hcaptcha-for-forms-and-more/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * Last activity: [3 months, 2 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-2/#post-18819095)
 * Status: resolved