PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.4
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.4
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 4.2.1 All 138 releases
learnpress / templates / checkout / form.php

form.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.4, at templates/checkout/form.php

68 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for displaying checkout form.
4 *
5 * This template can be overridden by copying it to yourtheme/learnpress/checkout/form.php.
6 *
7 * @author ThimPress
8 * @package Learnpress/Templates
9 * @version 4.0.6
10 */
11
12 defined( 'ABSPATH' ) || exit();
13
14 $checkout = LearnPress::instance()->checkout();
15 ?>
16 <?php
17 if ( ! is_user_logged_in() ) {
18 $enable_login_on_page_checkout = LP_Settings::get_option( 'enable_login_checkout', 'yes' ) === 'yes';
19 $login_text = sprintf(
20 '<a class="lp-link-login" href="%s">%s</a>',
21 learn_press_get_login_url( LP_Helper::getUrlCurrent() ),
22 __( 'login', 'learnpress' )
23 );
24
25 if ( $enable_login_on_page_checkout ) {
26 $login_text = __( 'login', 'learnpress' );
27 }
28 ?>
29 <div class="learn-press-message error">
30 <?php
31 printf(
32 __( 'Please %s in to enroll in the course!', 'learnpress' ),
33 $login_text
34 );
35 ?>
36 </div>
37 <?php
38 }
39
40 learn_press_show_message();
41 ?>
42 <form method="post" id="learn-press-checkout-form" name="learn-press-checkout-form" class="lp-checkout-form"
43 tabindex="0" action="<?php echo esc_url_raw( learn_press_get_checkout_url() ); ?>"
44 enctype="multipart/form-data">
45 <?php
46 if ( has_action( 'learn-press/before-checkout-form' ) ) {
47 ?>
48 <div class="lp-checkout-form__before">
49 <?php do_action( 'learn-press/before-checkout-form' ); ?>
50 </div>
51 <?php
52 }
53
54 do_action( 'learn-press/checkout-form' );
55
56 if ( has_action( 'learn-press/after-checkout-form' ) ) {
57 ?>
58 <div class="lp-checkout-form__after">
59 <?php do_action( 'learn-press/after-checkout-form' ); ?>
60 </div>
61 <?php
62 }
63
64 wp_nonce_field( 'learn-press-checkout', 'learn-press-checkout-nonce', false );
65 ?>
66 </form>
67 <?php
68