Closed martynmjones closed 3 months ago
I saw the unit tests failed in the checks. I tested in my local and it also failed when using WC 8.9.3
(latest), this is the error when running ./bin/install-unit-tests.sh
:
warning: Could not find remote branch 8.9.3 to clone.
fatal: Remote branch 8.9.3 not found in upstream origin
The woocommerce.json returns 8.9.3
as the latest WC version, but in WC GH repo there is no 8.9.3 branch.
Thanks for the review @ianlin!
I saw the unit tests failed in the checks. I tested in my local and it also failed when using WC
8.9.3
(latest), this is the error when running./bin/install-unit-tests.sh
:warning: Could not find remote branch 8.9.3 to clone. fatal: Remote branch 8.9.3 not found in upstream origin
The woocommerce.json returns
8.9.3
as the latest WC version, but in WC GH repo there is no 8.9.3 branch.
This is happening across other extensions at the moment as well. Ref: https://github.com/woocommerce/automatewoo/issues/1781
Changes proposed in this Pull Request:
Closes #432
When the formatted cart data is added to the
window.ga4w
object, the main WC (core) class should have instantiated WC_Cart. As reported in #432, an error is sometimes being recorded if the cart is unavailable.WooCommerce won't instantiate the cart if the request is not a frontend request. So this is likely caused by a cron configuration loading the frontend of the website or triggering the
wp_head
action at the very least. I've not been able to reproduce the error but this PR adds a simple check to confirm if the cart is available before accessing class methods.Detailed test instructions:
fix/432-error-if-cart-unavailable
You may be interested in…
sectionremove_from_cart
event is tracked in TagAssistant with the correct product informationChangelog entry