Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

nfd_wpnavbar_setting, Notice: Function wp_enqueue_script was called incorrectly. #1039

Closed
cardfaux opened this issue Apr 17, 2024 · 3 comments
Assignees

Comments

@cardfaux
Copy link

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

@chrisdavidmiles
Copy link
Contributor

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

@aratidgr8 aratidgr8 self-assigned this Apr 23, 2024
@chrisdavidmiles
Copy link
Contributor

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

@aratidgr8
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants