• Resolved David

    (@loano1)


    Hi WooCommerce team,

    After updating to WooCommerce 10.3.0, I started seeing this notice in my PHP error log:

    PHP Notice:  Function wp_script_is 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 'zoom' handle.
    

    Backtrace (from debug log):

    #6 /wp-content/plugins/woocommerce/includes/class-wc-frontend-scripts.php:67 wp_script_is
    #7 /wp-includes/class-wp-hook.php:324 add_legacy_script_warnings
    #8 /wp-includes/class-wp-hook.php:348 apply_filters
    #9 /wp-includes/plugin.php:517 do_action
    #10 /wp-includes/load.php:1304 do_action
    

    Environment:

    • WordPress version: Latest (6.8.3)
    • WooCommerce version: Latest (10.3.0)
    • PHP version: 8.3.26

    It appears wp_script_is('zoom') is being called before wp_enqueue_scripts, which triggers the “doing it wrong” notice.
    This didn’t appear prior to 10.3.0, so it may have been introduced by a recent change in WC_Frontend_Scripts.

    Thank you for looking into it!
    David

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @loano1,

    I understand how concerning it can be to see PHP notices like this start popping up after an update — especially when everything was working fine before. Thank you for sharing the full backtrace and environment details, that’s incredibly helpful.

    You’re right that this appears related to a change introduced in WooCommerce 10.3.0, where the wp_script_is(‘zoom’) call is likely being triggered too early in the load process, resulting in that “doing it wrong” warning.

    The good news is that WooCommerce has since released an update — version 10.3.2 — which addresses several issues reported after 10.3.0. I recommend updating to the latest version to see if this resolves the notice in your PHP logs.

    You can find the release notes here: https://developer.woocommerce.com/releases/

    Let us know if the issue continues after updating — we’re happy to take a closer look.

    Thread Starter David

    (@loano1)

    Hi @lovingbro ,

    Thanks for the clarification and for pointing out that the fix is included in WooCommerce 10.3.2. I really appreciate the quick follow-up.

    Since this is a production site, I’ll hold off on testing beta builds, but it’s good to know that the issue has already been addressed.

    Thanks again for the update!

    Best,
    David

    Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @loano1,

    Thank you for the thoughtful follow-up — I completely understand wanting to wait before updating on a live production site. That’s a smart call. If you’d like, you could set up a staging environment to safely test WooCommerce 10.3.2 and confirm that the notice is gone before applying it to your live store.

    Also, since this thread is now marked as resolved and I noticed you haven’t left a review for WooCommerce yet — if it’s been helpful for your store and you’ve appreciated the support, we’d truly be grateful if you could take a moment to leave us a ★★★★★ review here: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new-post

    Your feedback really helps us continue improving WooCommerce for everyone.

    amanandhishoe

    (@amanandhishoe)

    WooCommerce 10.3.0 recklessly changed the script handles used to load key assets without maintaining backward compatibility. They didn’t even bother to keep the old handles for a grace period, instantly breaking countless third-party plugins—including ones they themselves sell on WooCommerce.com.

    For a plugin powering millions of sites, this level of negligence is staggering. It’s lazy, incompetent coding and shows zero regard for developers or users. Never trust a WooCommerce update. Always test it on a development site first, because clearly the WooCommerce team doesn’t.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi @amanandhishoe

    Thank you for sharing your feedback — I completely understand how frustrating it can be when an update causes compatibility issues with other plugins.

    WooCommerce powers millions of stores and works alongside thousands of third-party extensions, so while we aim to maintain backward compatibility as much as possible, it isn’t always possible to guarantee that every external plugin will remain compatible after each update. In some cases, third-party developers may need to update their plugins to ensure full compatibility with the latest WooCommerce version.

    We always recommend testing updates on a staging site before applying them to a live store to avoid any disruption.

    Thank you for understanding and cooperations.

    LexGear

    (@lexgear)

    I’m on version 10.3.3 and I’m still getting heaps of warnings from woocommerce. I’m absolutely shocked you could remove these function names without testing first.

    Warnings related to woo and libraries:

    • flexslider
    • jquery-blockui
    • jquery-cookie
    • jquery-payment
    • photoswipe
    • prettyPhoto
    • select2
    • zoom

    Example:
    Notice: Function wp_script_is 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 flexslider handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /var/www/html/wp-includes/functions.php on line 6121

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi @lexgear

    I understand that you have a somewhat similar problem.

    However, per forum best practices shown here, it is advised that you create a new thread so that we can address your issue(s) separately.

    You can create a new thread here: https://ww.wp.xz.cn/support/plugin/woocommerce/#new-topic-0 and make sure to include as much information as you can.

    Thanks for understanding!

    LexGear

    (@lexgear)

    This isn’t a similar issue. This is the same issue. But sure. I’ll go make another thread.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there,

    I completely understand your concern. We always recommend creating a separate new ticket even if you’re facing the same issue, as it helps us track and manage each report individually.

    However, I’ve already replied to your new ticket, so let’s continue the conversation there to keep everything in one place.

    Thank you for your patience!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘PHP Notice: Function wp_script_is was called incorrectly (zoom handle)’ is closed to new replies.