bluehost-wordpress-plugin icon indicating copy to clipboard operation
bluehost-wordpress-plugin copied to clipboard

nfd_wpnavbar_setting, Notice: Function wp_enqueue_script was called incorrectly.

Open cardfaux opened this issue 10 months ago • 3 comments

Summarize the issue (briefly)

Got this error message: Notice: Function 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. This notice was triggered by the nfd_wpnavbar_setting handle. Steps to reproduce

  1. Go to...
  2. Click on...
  3. Scroll down to...
  4. See/experience error

Expected behavior

Screenshots

the problem was here and where it was being called above these lines in this function "set_wpnav_collapse_setting" Screenshot 2024-04-17 at 2 28 45 PM

Bluehost Plugin Version:

  • Version: 3.9.3

Browser (with version) & Operating System (with version)

  • Browser: Chrome
  • Operating System: MacOS
  • Device: m1. M1 Pro Laptop

Additional context

This file is in /vendor/newfold-labs/wp-module-ecommerce/includes/ECommerce.php

cardfaux avatar Apr 17 '24 20:04 cardfaux