PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.3.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.3.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 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.3.8, at templates/checkout/form.php

62 lines 1.5 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.5
10 */
11
12 defined( 'ABSPATH' ) || exit();
13
14 $checkout = LearnPress::instance()->checkout();
15 ?>
16 <?php
17 if ( ! is_user_logged_in() ) {
18 ?>
19 <div class="learn-press-message error">
20 <?php
21 printf(
22 __( 'Please %s in to enroll in the course!', 'learnpress' ),
23 sprintf(
24 '<a class="lp-link-login" href="%s">%s</a>',
25 learn_press_get_login_url( LP_Helper::getUrlCurrent() ),
26 __( 'login', 'learnpress' )
27 )
28 );
29 ?>
30 </div>
31 <?php
32 }
33
34 learn_press_show_message();
35 ?>
36 <form method="post" id="learn-press-checkout-form" name="learn-press-checkout-form" class="lp-checkout-form"
37 tabindex="0" action="<?php echo esc_url_raw( learn_press_get_checkout_url() ); ?>"
38 enctype="multipart/form-data">
39 <?php
40 if ( has_action( 'learn-press/before-checkout-form' ) ) {
41 ?>
42 <div class="lp-checkout-form__before">
43 <?php do_action( 'learn-press/before-checkout-form' ); ?>
44 </div>
45 <?php
46 }
47
48 do_action( 'learn-press/checkout-form' );
49
50 if ( has_action( 'learn-press/after-checkout-form' ) ) {
51 ?>
52 <div class="lp-checkout-form__after">
53 <?php do_action( 'learn-press/after-checkout-form' ); ?>
54 </div>
55 <?php
56 }
57
58 wp_nonce_field( 'learn-press-checkout', 'learn-press-checkout-nonce', false );
59 ?>
60 </form>
61 <?php
62