• Resolved jeroenvdh073

    (@jeroenvdh073)


    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 checkout

    can anyone help me get this to work?
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    The best support you’ll receive for this type of question would be from the developers of the pop-up plugin.

    While we could make guesses, we have no idea how that plugin actually works to compile the pop-up’s from these shortcodes.
    Chances are, they’ve had this question before and can offer you a simple solution.

    Thank you,
    Joey

    Plugin Support EtienneP a11n

    (@etiennep)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trigger shortcode on the checkout login page’ is closed to new replies.