Hi there, @alienjackhammer,
To exclude specific JavaScript files from being deferred by Jetpack Boost, you can try adding the attribute data-jetpack-boost="ignore" to the script tag of the WooCommerce order attribution script. If the script is enqueued using wp_enqueue_script, you can modify it in your theme’s functions.php file.
For more details, please refer to Exclude JavaScript files from Jetpack Boost deferral.
Hope that helps! If you need further assistance, feel free to reply to this thread.
Thank you!
Thanks for the response. I did try this and unfortunately, no success. After messing with it for an hour or so; it effectively stopped the JS from running at all. I’m not sure what is causing this… whether it’s Jetpack, WordPress or WooCommerce. But, I’m sure I can’t be the only one experiencing this issue. Since there was a WP and Woo update nearly at the same time; it is hard to debug what broke what. It’s not a huge enough deal to rollback to a previous version(s). If you have any additional clues in the future; let me know.
Hi @alienjackhammer,
Thanks for the details – sorry our previous suggestions didn’t work out. Adding the ignore attribute is indeed the correct approach for scripts that shouldn’t be deferred. If that didn’t resolve the issue, it’s likely that the attribute wasn’t applied to the exact script WooCommerce needs for order attribution.
Unfortunately, identifying the specific script causing the conflict can be quite difficult, and falls outside the scope of what Jetpack Boost can safely handle on a case-by-case basis. If you’re comfortable digging in, you can try applying the ignore attribute to different WooCommerce attribution scripts until the checkout flow works again.
Otherwise, the simplest option is to keep Defer non-essential JavaScript turned off to avoid the conflict altogether.
Hope that helps! Let me know if there’s anything else we can do to help 🙂