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 1 year 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

Thanks for the report @cardfaux - we will look into it and get it fixed in an upcoming release.

chrisdavidmiles avatar Apr 19 '24 10:04 chrisdavidmiles

@cardfaux the fix for this is expected to be released May 1st in a new version of the plugin. Thanks again for the report.

chrisdavidmiles avatar Apr 24 '24 14:04 chrisdavidmiles

@chrisdavidmiles Code fixes are completed. You can review the same in PR cc: @cardfaux

aratidgr8 avatar Apr 25 '24 07:04 aratidgr8