| @@ -11,10 +11,9 @@ | ||
| 11 | 11 | |
| 12 | 12 | defined( 'ABSPATH' ) || exit(); |
| 13 | 13 | ?> |
| 14 | 14 | |
| 15 | -<input type="radio" id="checkout-account-switch-to-register" name="checkout-account-switch-form" checked="checked" value="register"/> | |
| 16 | -<div id="checkout-account-register" class="checkout-account-switch-form lp-checkout-block left"> | |
| 15 | +<div id="checkout-account-register" class="lp-checkout-block left"> | |
| 17 | 16 | |
| 18 | 17 | <h4><?php esc_html_e( 'Sign up', 'learnpress' ); ?></h4> |
| 19 | 18 | |
| 20 | 19 | <ul class="lp-form-fields"> |
| @@ -39,15 +38,21 @@ | ||
| 39 | 38 | |
| 40 | 39 | <?php do_action( 'learn-press/after-form-register-fields' ); ?> |
| 41 | 40 | </ul> |
| 42 | 41 | |
| 43 | - <?php wp_nonce_field( 'learn-press-checkout-register', 'learn-press-checkout-nonce' ); ?> | |
| 42 | + <?php | |
| 43 | + // Add hook of WordPress | |
| 44 | + do_action( 'register_form' ); | |
| 45 | + do_action( 'login_enqueue_scripts' ); | |
| 46 | + ?> | |
| 44 | 47 | |
| 48 | + <?php //wp_nonce_field( 'learn-press-checkout-register', 'learn-press-checkout-nonce' ); ?> | |
| 49 | + | |
| 45 | 50 | <p class="lp-checkout-sign-in-link"> |
| 46 | - <?php if ( LP()->checkout()->is_enable_login() ) : ?> | |
| 51 | + <?php if ( LearnPress::instance()->checkout()->is_enable_login() ) : ?> | |
| 47 | 52 | <?php esc_html_e( 'Already had an account?', 'learnpress' ); ?> |
| 48 | - <a href="javascript: void(0);"> | |
| 49 | - <label for="checkout-account-switch-to-login"><?php esc_html_e( 'Sign in', 'learnpress' ); ?></label> | |
| 53 | + <a href="<?php echo esc_url( add_query_arg( 'is_form_login', '1', LP_Helper::get_link_no_cache( learn_press_get_page_link( 'checkout' ) ) ) ); ?>"> | |
| 54 | + <?php esc_html_e( 'Sign in', 'learnpress' ); ?> | |
| 50 | 55 | </a>. |
| 51 | 56 | <?php endif; ?> |
| 52 | 57 | |
| 53 | 58 | <?php learn_press_get_template( 'checkout/guest-checkout-link' ); ?> |