# learnpress/4.4.9/inc/templates/class-lp-template-checkout.php

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

- Page: https://pluginprobe.com/plugins/learnpress/4.4.9/code/inc/templates/class-lp-template-checkout.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.9/raw/inc/templates/class-lp-template-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/inc/templates/class-lp-template-checkout.php#L10-L20`.

```php
<?php

/**
 * Class LP_Template_Checkout
 *
 * Groups templates related checkout page
 *
 * @since 3.x.x
 */
class LP_Template_Checkout extends LP_Abstract_Template {

	/**
	 * LP_Template_Checkout constructor.
	 */
	public function __construct() {
		parent::__construct();
	}

	public function review_order() {
		$cart = LearnPress::instance()->cart;
		learn_press_get_template( 'checkout/review-order', compact( 'cart' ) );
	}

	public function payment() {
		$available_gateways = LP_Gateways::instance()->get_available_payment_gateways();

		learn_press_get_template( 'checkout/payment.php', array( 'available_gateways' => $available_gateways ) );
	}

	public function order_comment() {
		learn_press_get_template( 'checkout/order-comment.php' );
	}

	public function account_logged_in() {
		if ( ! is_user_logged_in() ) {
			return;
		}

		learn_press_get_template( 'checkout/account-logged-in' );
	}

	public function account_login() {
		$checkout = LearnPress::instance()->checkout();

		if ( is_user_logged_in()
			|| ! $checkout->is_enable_login()
			|| ( $checkout->is_enable_guest_checkout() && ! isset( $_GET['is_form_login'] ) ) ) {
			return;
		}

		if ( isset( $_GET['is_form_register'] ) ) {
			return;
		}

		learn_press_get_template( 'checkout/account-login' );
	}

	public function account_register() {
		if ( is_user_logged_in()
			|| ! LearnPress::instance()->checkout()->is_enable_register()
			|| isset( $_GET['is_form_login'] )
			|| ! isset( $_GET['is_form_register'] ) ) {
			return;
		}

		learn_press_get_template( 'checkout/account-register' );
	}

	public function guest_checkout() {
		$is_account_form = isset( $_GET['is_form_login'] ) || isset( $_GET['is_form_register'] );

		if ( is_user_logged_in()
			|| ! LearnPress::instance()->checkout()->is_enable_guest_checkout()
			|| $is_account_form ) {
			return;
		}

		learn_press_get_template( 'checkout/guest-checkout' );
	}

	public function terms() {
		learn_press_get_template( 'checkout/term-conditions' );
	}
}

return new LP_Template_Checkout();

```
