Title: PHP Notice:  wp_enqueue_script was called inccorectly
Last modified: August 21, 2016

---

# PHP Notice: wp_enqueue_script was called inccorectly

 *  [J.D. Grimes](https://wordpress.org/support/users/jdgrimes/)
 * (@jdgrimes)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-notice-wp_enqueue_script-was-called-inccorectly/)
 * You need to call `wp_enqueue_script()` inside of the `'wp_enqueue_script`‘ action
   hook. Right now you’ll get this error if you have `WP_DEBUG` on:
 * > PHP Notice: wp_enqueue_script was called **incorrectly**. Scripts and styles
   > should not be registered or enqueued until the `wp_enqueue_scripts`, `admin_enqueue_scripts`,
   > or `init` hooks. Please see [Debugging in WordPress](http://codex.wordpress.org/Debugging_in_WordPress)
   > for more information. (This message was added in version 3.3.)
 * Example:
 *     ```
       function comment_ca_va() {
   
            wp_enqueue_script( "CommentCaVa", plugins_url() . "/CommentCaVa/CommentCaVa.js" );
       }
       add_action( 'wp_enqueue_script', 'comment_ca_va' );
       ```
   
 * [http://wordpress.org/extend/plugins/commentcava/](http://wordpress.org/extend/plugins/commentcava/)

The topic ‘PHP Notice: wp_enqueue_script was called inccorectly’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/commentcava.svg)
 * [CommentCaVa](https://wordpress.org/plugins/commentcava/)
 * [Support Threads](https://wordpress.org/support/plugin/commentcava/)
 * [Active Topics](https://wordpress.org/support/plugin/commentcava/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/commentcava/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/commentcava/reviews/)

## Tags

 * [PHP Notice](https://wordpress.org/support/topic-tag/php-notice/)
 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * 0 replies
 * 1 participant
 * Last reply from: [J.D. Grimes](https://wordpress.org/support/users/jdgrimes/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/php-notice-wp_enqueue_script-was-called-inccorectly/)
 * Status: not resolved