Skip to content

Conversation

@clifgriffin
Copy link
Contributor

Greetings!

We've recently noticed that the simple turnstile plugin isn't working alongside CheckoutWC, We've had quite a few of our merchants use your plugin alongside ours for sometime, so it would be great if we could get it back up and working again.

We were able to take a look on our local test sites this morning and noticed that there was an update done in December which added WooCommerce Block checkout support. Unfortunately, this code seems to be the culprit of the issue our CheckoutWC merchants are experiencing. When loading the CheckoutWC checkout page, an uncaught JS exception is thrown which breaks the rest of the checkout page. The exception comes from the new code that was added for blocks, specifically, when trying to use turnstile to render (inside the (wp && wp.data) conditional block) the HTML DOM element is not yet on the page, and as it's trying to read from the HTML element dataset on page load without any safety checks, it's causing the exception.

We noticed that you have some compatibility code for CheckoutWC in your plugin, and it looks to be currently using the cfw_after_cart_summary_totals hook. By moving this to cfw_checkout_payment_method_tab on priority 50, we were able to resolve the issue.

Please let me know if you have any questions.

@ElliotSowersby ElliotSowersby merged commit 4378ab9 into ElliotSowersby:master Jan 13, 2025
@LadisWasharum
Copy link

Seems now that side cart for CheckoutWC does not work along side this plugin anymore, at least for me..

@vacwell
Copy link

vacwell commented May 29, 2025

Hi,
there is a conflict between Cloudflare Turnstile and CheckoutWC in WooCommerce. The integration with CheckoutWC causes an error on the checkout page (see attached screenshot).

Screenshot 2025-05-28 at 7 04 56 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants