Trigger shortcode on the checkout login page
-
Hi,
I use a plugin for a login / register popup, and can trigger it with a shortcode. When a customer is not logged in and goes to checkout, the standard Woocommerce login form appears. I want to replace this with the popup, but I don’t know exactly how to activate the shortcode.
This is the shortcode:
[xoo_el_action]
This is the code of my woocommerce form-login.php:
defined( 'ABSPATH' ) || exit; if ( is_user_logged_in() || 'no' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ) { return; } ?> <div class="woocommerce-form-login-toggle"> <?php wc_print_notice( apply_filters( 'woocommerce_checkout_login_message', esc_html__( 'Returning customer?', 'woocommerce' ) ) . ' <a href="#" class="showlogin">' . esc_html__( 'Click here to login', 'woocommerce' ) . '</a>', 'notice' ); ?> </div> <?php woocommerce_login_form( array( 'message' => esc_html__( 'If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing section.', 'woocommerce' ), 'redirect' => wc_get_page_permalink( 'checkout' ), 'hidden' => true, ) );
So i need this to happen:
1. customer goes to checkout
2. if not logged in, trigger popup
3. after login or register, proceed to checkoutcan anyone help me get this to work?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Trigger shortcode on the checkout login page’ is closed to new replies.