GTM4WP 2.0.4 is out
GTM4WP 2.0.4 fixes a WooCommerce checkout problem where a Google Tag Manager tracking error could make Stripe card payments fail.
GTM4WP 2.0.4 is out on wordpress.org. It is a small bugfix release for the 2.0 line with one fix for WooCommerce stores, and if your store uses the classic checkout with Stripe or another payment gateway that collects the card details in the browser, I recommend updating now. The update reaches your dashboard a few hours after the release, because wordpress.org runs an automated security review on every plugin release before it is offered as a one-click update; if you do not want to wait, you can download it from the plugin page right away. The complete list of changes is in the GTM4WP 2.0.4 changelog.
Orders rejected by Stripe on the classic checkout
On the classic WooCommerce checkout, the plugin tracks the checkout steps at the moment the customer places the order. WooCommerce runs this tracking code without any protection against errors, so when the tracking code failed, WooCommerce did not finish its own work either and the browser submitted the checkout form the plain way. A payment gateway that adds the card details in the browser, such as the WooCommerce Stripe Gateway, never got the chance to add them, and the payment was rejected because the payment method ID was missing from the request.
From 2.0.4, an error in the tracking code can no longer interrupt the checkout, so the order goes through even when the tracking fails. The error still appears in the browser console so that it does not go unnoticed. The same protection now covers the tracking that runs when a customer selects a product variation, where an error could stop WooCommerce’s own variation form code from finishing.
Thank you to mush-wtw and webagencyhero for the reports and for the console output they shared.
Please report problems in the support forum on wordpress.org or on GitHub.
