PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.3.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.3.9
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / templates / class-lp-template-checkout.php

class-lp-template-checkout.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.3.9, at inc/templates/class-lp-template-checkout.php

72 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class LP_Template_Checkout
5 *
6 * Groups templates related checkout page
7 *
8 * @since 3.x.x
9 */
10 class LP_Template_Checkout extends LP_Abstract_Template {
11
12 /**
13 * LP_Template_Checkout constructor.
14 */
15 public function __construct() {
16 parent::__construct();
17 }
18
19 public function review_order() {
20 $cart = LearnPress::instance()->cart;
21 learn_press_get_template( 'checkout/review-order', compact( 'cart' ) );
22 }
23
24 public function payment() {
25 $available_gateways = LP_Gateways::instance()->get_available_payment_gateways();
26
27 learn_press_get_template( 'checkout/payment.php', array( 'available_gateways' => $available_gateways ) );
28 }
29
30 public function order_comment() {
31 learn_press_get_template( 'checkout/order-comment.php' );
32 }
33
34 public function account_logged_in() {
35 if ( ! is_user_logged_in() ) {
36 return;
37 }
38
39 learn_press_get_template( 'checkout/account-logged-in' );
40 }
41
42 public function account_login() {
43 if ( is_user_logged_in() || ! LearnPress::instance()->checkout()->is_enable_login() ) {
44 return;
45 }
46
47 learn_press_get_template( 'checkout/account-login' );
48 }
49
50 public function account_register() {
51 if ( is_user_logged_in() || ! LearnPress::instance()->checkout()->is_enable_register() ) {
52 return;
53 }
54
55 learn_press_get_template( 'checkout/account-register' );
56 }
57
58 public function guest_checkout() {
59 if ( is_user_logged_in() || ! LearnPress::instance()->checkout()->is_enable_guest_checkout() ) {
60 return;
61 }
62
63 learn_press_get_template( 'checkout/guest-checkout' );
64 }
65
66 public function terms() {
67 learn_press_get_template( 'checkout/term-conditions' );
68 }
69 }
70
71 return new LP_Template_Checkout();
72