• Resolved over-engineer



    I just wanted to let you know that the latest version (3.7.0) on a WordPress installation with WP_DEBUG enabled, outputs the following notice:

    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 login_enqueue_scripts hooks.

    The issue seems to be caused by this wp_enqueue_script():

    //Add Gutenberg Widget
      plugin_dir_url( __FILE__ ) . '/js/block.js', 
      array('wp-blocks', 'wp-i18n', 'wp-element'), // Required scripts for the block

    which is located in the gutenberg_block_setup() method of the Cookiebot_WP class in cookiebot.php (line 225)

    • This topic was modified 2 years, 5 months ago by over-engineer. Reason: Added line number
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘wp_enqueue_script called incorrectly’ is closed to new replies.