edd-order-history-card.php
1 month ago
native-order-history-card.php
1 month ago
order-history.php
3 weeks ago
wc-order-history-card.php
1 month ago
native-order-history-card.php
67 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Native: Order card template for billing |
| 4 | * |
| 5 | * @package Tutor\Templates |
| 6 | * @subpackage Dashboard |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 4.0.0 |
| 10 | */ |
| 11 | |
| 12 | defined( 'ABSPATH' ) || exit; |
| 13 | |
| 14 | use Tutor\Helpers\ComponentHelper; |
| 15 | use Tutor\Helpers\DateTimeHelper; |
| 16 | use Tutor\Models\OrderModel; |
| 17 | |
| 18 | $order_data = $data['order_data'] ?? null; |
| 19 | if ( ! $order_data || ! is_object( $order_data ) ) { |
| 20 | return; |
| 21 | } |
| 22 | |
| 23 | $titles = OrderModel::get_order_history_titles( $order_data ); |
| 24 | |
| 25 | ?> |
| 26 | <div class="tutor-billing-card"> |
| 27 | <div class="tutor-billing-card-left"> |
| 28 | <div class="tutor-billing-card-title"> |
| 29 | <ul class="tutor-pl-1 tutor-m-none"> |
| 30 | <?php foreach ( $titles as $item_title ) : ?> |
| 31 | <li><span><?php echo esc_html( $item_title ); ?></span></li> |
| 32 | <?php endforeach; ?> |
| 33 | </ul> |
| 34 | </div> |
| 35 | <div class="tutor-billing-card-details"> |
| 36 | <div class="tutor-billing-card-id"> |
| 37 | #<?php echo esc_html( $order_data->id ); ?> |
| 38 | </div> |
| 39 | |
| 40 | <span class="tutor-tiny"> |
| 41 | <?php echo esc_html( DateTimeHelper::get_gmt_to_user_timezone_date( $order_data->created_at_gmt ) ); ?> |
| 42 | </span> |
| 43 | |
| 44 | <?php if ( ! empty( $order_data->payment_method ) ) : ?> |
| 45 | <span class="tutor-section-separator-vertical tutor-sm-hidden"></span> |
| 46 | |
| 47 | <div class="tutor-billing-card-payment-method"> |
| 48 | <?php ComponentHelper::render_payment_method_badge( $order_data->payment_method ); ?> |
| 49 | </div> |
| 50 | <?php endif; ?> |
| 51 | </div> |
| 52 | </div> |
| 53 | |
| 54 | <div class="tutor-billing-card-right"> |
| 55 | <?php ComponentHelper::render_status_badge( $order_data->order_status ); ?> |
| 56 | |
| 57 | <div class="tutor-billing-card-amount"> |
| 58 | <?php echo wp_kses( tutor_get_formatted_price( $order_data->total_price ), tutor_price_allowed_html() ); ?> |
| 59 | </div> |
| 60 | |
| 61 | <?php |
| 62 | OrderModel::render_pay_button( $order_data ); |
| 63 | do_action( 'tutor_dashboard_invoice_button', $order_data ); |
| 64 | ?> |
| 65 | </div> |
| 66 | </div> |
| 67 |