Title: Function WP_Scripts::add was called incorrectly
Last modified: April 3, 2026

---

# Function WP_Scripts::add was called incorrectly

 *  Resolved [webparaplan](https://wordpress.org/support/users/webparaplan/)
 * (@webparaplan)
 * [1 month, 3 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-3/)
 * Have many notice in debug.log from your plugin. Can you fix it in upcoming updates?
 *     ```wp-block-code
       [03-Apr-2026 14:44:34 UTC] PHP Notice: Function WP_Scripts::add was called <strong>incorrectly</strong>. The script with handle "hcaptcha-nf" was enqueued with unregistered dependencies: hcaptcha, nf-front-end, nf-front-end-deps. Additional information can be found on the <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">&laquo;Debugging in WordPress&raquo;</a> page. (This message was added in version 6.9.1.) in /my_path/wp-includes/functions.php on line 6131
       ```
   
 * I understand this is not a critical error — the plugin works fine — but I like
   to keep my `debug.log` clean so I can spot real issues quickly. This notice clutters
   the log and makes proactive debugging harder.
    -  This topic was modified 1 month, 3 weeks ago by [webparaplan](https://wordpress.org/support/users/webparaplan/).

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

 *  Plugin Contributor [kaggdesign](https://wordpress.org/support/users/kaggdesign/)
 * (@kaggdesign)
 * [1 month, 3 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-3/#post-18871479)
 * Спасибо за репорт. Да, это баг, я добавил исправление в следующую версию, которая
   выйдет в начале мая.
   Вы можете временно исправить у себя, добавив 3 строчки в
   начало метода `\HCaptcha\NF\NF::nf_captcha_script` (файл `src/php/NF/NF.php`)
 *     ```wp-block-code
       if ( ! hcaptcha()->form_shown ) {  return;}
       ```
   
 *  Thread Starter [webparaplan](https://wordpress.org/support/users/webparaplan/)
 * (@webparaplan)
 * [1 month, 3 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-3/#post-18871490)
 * [@kaggdesign](https://wordpress.org/support/users/kaggdesign/) огонь спасибо

Viewing 2 replies - 1 through 2 (of 2 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-3%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/)

 * 2 replies
 * 2 participants
 * Last reply from: [webparaplan](https://wordpress.org/support/users/webparaplan/)
 * Last activity: [1 month, 3 weeks ago](https://wordpress.org/support/topic/function-wp_scriptsadd-was-called-incorrectly-3/#post-18871490)
 * Status: resolved