NO BUG: Checkout snippet - mover returning account - not working the login toggle

Bricks Version: 1.6.2

Hi!

If I move (anywhere) the returning user login element with php snippet, the login toggle not wokring. (always open status, and cant close-open with click)
When i delete my snippet, and this element go back to the top of page, working goog again.

The coupon code solution is same problem!

function move_wc_returning_customer() {
    remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 );
    add_action( 'woocommerce_before_checkout_billing_form', 'woocommerce_checkout_login_form', 10 );
}
add_action( 'init', 'move_wc_returning_customer' );

Hi @simplecreative ,

Your custom code breaks the WooCommerce JavaScript and causes those links don’t work.
You can try to use the same code on a different theme and they will be the same result.

You should check the WooCommerce checkout.js
WooCommerce listen on a.showLogin click event and look for form.login, form.woocommerce-form--login .
Since you changed the HTML structure, now the form will not be showing anymore which is correct result.

Hence, this is not a Bricks Bug.

Thank you.

Regards,
Jenn

Thanks you answer. And could you help, how can i change this snippet, that not brokent the javascript what need to use? :slight_smile: