# learnpress/4.4.9/templates/checkout/guest-checkout.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.9. 74 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.9/code/templates/checkout/guest-checkout.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.9/raw/templates/checkout/guest-checkout.php
- Modified: 2026-09-27T10:32:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.9/code/templates/checkout/guest-checkout.php#L10-L20`.

```php
<?php
/**
 * Template for displaying user email field which enable checkout as guest.
 *
 * This template can be overridden by copying it to yourtheme/learnpress/checkout/guest-email.php.
 *
 * @author   ThimPress
 * @package  Learnpress/Templates
 * @version  4.0.1
 */

defined( 'ABSPATH' ) || exit();

$checkout  = LearnPress::instance()->checkout();
$is_exists = $checkout->checkout_email_exists();
?>

<div id="checkout-account-guest" class="lp-checkout-block <?php echo esc_attr( $is_exists ? 'email-exists' : '' ); ?>">
	<h4><?php esc_html_e( 'As Guest', 'learnpress' ); ?></h4>
	<ul class="lp-form-fields">
		<li class="form-field">
			<input size="30" placeholder="<?php esc_attr_e( 'Enter your email...', 'learnpress' ); ?>" type="text" id="guest_email" name="guest_email" autocomplete="off">
			<div class="lp-guest-checkout-notice">
				<?php esc_html_e( 'An order key to activate the course will be sent to your email after the payment has proceeded successfully.', 'learnpress' ); ?>
			</div>

			<?php
			$signin  = '';
			$signup  = '';
			$divider = '';

			if ( LearnPress::instance()->checkout()->is_enable_login() ) {
				$signin = sprintf(
					'<a href="%s">%s</a>',
					esc_url(
						add_query_arg(
							'is_form_login',
							'1',
							LP_Helper::get_link_no_cache( learn_press_get_page_link( 'checkout' ) )
						)
					),
					esc_html( _x( 'Sign in', 'checkout sign in link', 'learnpress' ) )
				);
			}

			if ( LearnPress::instance()->checkout()->is_enable_login()
				&& LearnPress::instance()->checkout()->is_enable_register() ) {
				$divider = ',';
			}

			if ( LearnPress::instance()->checkout()->is_enable_register() ) {
				$signup = sprintf(
					'<a href="%s">%s</a>',
					esc_url(
						add_query_arg(
							'is_form_register',
							'1',
							LP_Helper::get_link_no_cache( learn_press_get_page_link( 'checkout' ) )
						)
					),
					esc_html( _x( 'Sign up', 'checkout sign up link', 'learnpress' ) )
				);
			}
			?>

			<?php if ( LearnPress::instance()->checkout()->is_enable_login() || LearnPress::instance()->checkout()->is_enable_register() ) : ?>
				<div class="lp-guest-switch-login">
					<?php echo sprintf( __( 'Or you can %1$s%2$s %3$s now.', 'learnpress' ), $signin, $divider, $signup ); ?>
				</div>
			<?php endif; ?>
		</li>
	</ul>
</div>

```
