PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.7
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.7
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 / order / confirm.php

confirm.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.7, at templates/order/confirm.php

86 lines 2.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 confirm message after order is placed.
4 *
5 * This template can be overridden by copying it to yourtheme/learnpress/order/confirm.php.
6 *
7 * @author ThimPress
8 * @package Learnpress/Templates
9 * @version 3.0.0
10 */
11
12 defined( 'ABSPATH' ) || exit();
13
14 if ( ! isset( $order ) ) {
15 $order = learn_press_get_order();
16 }
17 ?>
18
19 <?php if ( $order ) { ?>
20
21 <?php if ( $order->has_status( 'failed' ) ) : ?>
22 <p>
23 <?php esc_html_e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction.', 'learnpress' ); ?>
24 </p>
25
26 <p>
27 <?php
28 if ( is_user_logged_in() ) {
29 esc_html_e( 'Please attempt your purchase again or go to your account page.', 'learnpress' );
30 } else {
31 esc_html_e( 'Please attempt your purchase again.', 'learnpress' );
32 }
33 ?>
34 </p>
35
36 <?php else : ?>
37 <?php $confirm_text = $order->get_confirm_order_received_text(); ?>
38
39 <?php if ( false !== $confirm_text ) : ?>
40 <p class="confirm-order-received-text"><?php echo esc_html( $confirm_text ); ?></p>
41 <?php endif; ?>
42
43 <?php do_action( 'learn-press/before-confirm-order-details', $order->get_id() ); ?>
44
45 <ul class="order_details">
46 <li class="order">
47 <?php esc_html_e( 'Order Number:', 'learnpress' ); ?>
48 <strong><?php echo esc_html( $order->get_order_number() ); ?></strong>
49 </li>
50
51 <li class="date">
52 <?php esc_html_e( 'Date:', 'learnpress' ); ?>
53 <strong><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></strong>
54 </li>
55
56 <li class="total">
57 <?php esc_html_e( 'Total:', 'learnpress' ); ?>
58 <strong><?php echo esc_html( $order->get_formatted_order_total() ); ?></strong>
59 </li>
60
61 <?php $payment_method_title = $order->get_payment_method_title(); ?>
62 <?php if ( $payment_method_title ) : ?>
63 <li class="method">
64 <?php esc_html_e( 'Payment Method:', 'learnpress' ); ?>
65 <strong><?php echo wp_kses_post( $payment_method_title ); ?></strong>
66 </li>
67 <?php endif; ?>
68
69 <li class="status">
70 <?php esc_html_e( 'Status:', 'learnpress' ); ?>
71 <strong><?php echo esc_html( $order->get_status() ); ?></strong>
72 </li>
73 </ul>
74
75 <?php do_action( 'learn-press/after-confirm-order-details', $order->get_id() ); ?>
76 <?php endif; ?>
77
78 <?php do_action( 'learn_press_confirm_order' . $order->transaction_method, $order->get_id() ); ?>
79 <?php do_action( 'learn_press_confirm_order', $order->get_id() ); ?>
80
81 <?php } else { ?>
82
83 <p><?php echo esc_html( $order->get_thankyou_message() ); ?></p>
84
85 <?php } ?>
86