PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.6.9.2
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.6.9.2
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 / templates / checkout / review-order.php

review-order.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.6.9.2, at templates/checkout/review-order.php

118 lines 3.8 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 reviewing before placing order.
4 *
5 * This template can be overridden by copying it to yourtheme/learnpress/checkout/review-order.php.
6 *
7 * @author ThimPress
8 * @package Learnpress/Templates
9 * @version 4.0.1
10 */
11
12 defined( 'ABSPATH' ) || exit();
13
14 // $cart = learn_press_get_checkout_cart();
15
16 if ( ! isset( $cart ) ) {
17 return;
18 }
19 ?>
20
21 <div id="checkout-order" class="lp-checkout-block right">
22
23 <h4><?php esc_html_e( 'Your order', 'learnpress' ); ?></h4>
24
25 <div class="lp-checkout-order__inner">
26 <table>
27 <tbody>
28
29 <?php
30 do_action( 'learn_press_review_order_before_cart_contents' );
31 do_action( 'learn-press/review-order/before-cart-contents' );
32
33 $items = $cart->get_items();
34
35 if ( $items ) {
36 foreach ( $items as $cart_item_key => $cart_item ) {
37 $cart_item = apply_filters( 'learn-press/review-order/cart-item', $cart_item );
38 $item_id = $cart_item['item_id'];
39 $_course = apply_filters( 'learn-press/review-order/cart-item-product', learn_press_get_course( $item_id ), $cart_item );
40
41 if ( $_course && 0 < $cart_item['quantity'] ) {
42 ?>
43 <tr class="<?php echo esc_attr( apply_filters( 'learn-press/review-order/cart-item-class', 'cart-item', $cart_item, $cart_item_key ) ); ?>">
44 <?php
45 do_action( 'learn_press_review_order_before_cart_item', $cart_item );
46 do_action( 'learn-press/review-order/before-cart-item', $cart_item, $cart_item_key );
47 ?>
48
49 <td class="course-thumbnail">
50 <?php echo wp_kses_post( $_course->get_image() ); ?>
51 </td>
52 <td class="course-name">
53 <a href="<?php echo esc_url_raw( apply_filters( 'learn-press/review-order/cart-item-link', get_the_permalink( $item_id ), $cart_item ) ); ?>">
54 <?php echo wp_kses_post( apply_filters( 'learn-press/review-order/cart-item-name', $_course->get_title(), $cart_item, $cart_item_key ) ); ?>
55 </a>
56
57 <?php
58 if ( $cart_item['quantity'] > 1 ) {
59 echo wp_kses_post( apply_filters( 'learn-press/review-order/cart-item-quantity', ' <strong class="course-quantity">' . sprintf( '&times; %s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ) );
60 }
61 ?>
62 </td>
63 <td class="course-total col-number">
64 <?php echo esc_html( apply_filters( 'learn-press/review-order/cart-item-subtotal', $cart->get_item_subtotal( $_course, $cart_item['quantity'] ), $cart_item, $cart_item_key ) ); ?>
65 </td>
66
67 <?php
68 do_action( 'learn-press/review-order/after-cart-item', $cart_item, $cart_item_key );
69 do_action( 'learn_press_review_order_after_cart_item', $cart_item );
70 ?>
71 </tr>
72
73 <?php
74 }
75 }
76 }
77
78 do_action( 'learn-press/review-order/after-cart-contents' );
79 do_action( 'learn_press_review_order_after_cart_contents' );
80 ?>
81
82 </tbody>
83
84 <tfoot>
85 <tr class="cart-subtotal">
86
87 <?php do_action( 'learn-press/review-order/before-subtotal-row' ); ?>
88
89 <th colspan="2"><?php _e( 'Subtotal', 'learnpress' ); ?></th>
90 <td class="col-number"><?php echo esc_html( $cart->get_subtotal() ); ?></td>
91
92 <?php do_action( 'learn-press/review-order/after-subtotal-row' ); ?>
93 </tr>
94
95 <?php
96 do_action( 'learn_press_review_order_before_order_total' );
97 do_action( 'learn-press/review-order/before-order-total' );
98 ?>
99
100 <tr class="order-total">
101 <?php do_action( 'learn-press/review-order/before-total-row' ); ?>
102
103 <th colspan="2"><?php esc_html_e( 'Total', 'learnpress' ); ?></th>
104 <td class="col-number"><?php echo esc_html( $cart->get_total() ); ?></td>
105
106 <?php do_action( 'learn-press/review-order/after-total-row' ); ?>
107 </tr>
108
109 <?php
110 do_action( 'learn-press/review-order/after-order-total' );
111 do_action( 'learn_press_review_order_after_order_total' );
112 ?>
113
114 </tfoot>
115 </table>
116 </div>
117 </div>
118