WooCommerce Checkout page breaks when reCaptcha is added
-
The core.php file has a hook that adds the reCaptcha to WooCommerce Checkout:
// Woo Checkout. $enable_woo_checkout = advanced_google_recaptcha_option( 'enable_woo_checkout' ); if ( 1 === absint( $enable_woo_checkout ) && ! is_user_logged_in() ) { $hooks[] = 'woocommerce_checkout_after_customer_details'; }
There is an issue with hooking the reCaptcha to “woocommerce_checkout_after_customer_details”, as this adds a div directly between the two columns of the checkout page, breaking the layout.
I manually changed the hook to:
// Woo Checkout. $enable_woo_checkout = advanced_google_recaptcha_option( 'enable_woo_checkout' ); if ( 1 === absint( $enable_woo_checkout ) && ! is_user_logged_in() ) { $hooks[] = 'woocommerce_review_order_before_submit'; }
Where I am hooking reCaptcha to “woocommerce_review_order_before_submit”, which is directly above the credit card payment form.
Is it possible for you to make this change as the developer, so a future update doesn’t break the page again?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WooCommerce Checkout page breaks when reCaptcha is added’ is closed to new replies.