| 1 |
<table class="widefat striped"> |
| 2 |
<thead> |
| 3 |
<tr> |
| 4 |
<th><?php |
| 5 |
esc_html_e( 'Order', 'sdevs_subscrpt' ); ?></th> |
| 6 |
<th></th> |
| 7 |
<th><?php esc_html_e( 'Date', 'sdevs_subscrpt' ); ?></th> |
| 8 |
<th><?php esc_html_e( 'Status', 'sdevs_subscrpt' ); ?></th> |
| 9 |
<th><?php esc_html_e( 'Amount', 'sdevs_subscrpt' ); ?></th> |
| 10 |
</tr> |
| 11 |
</thead> |
| 12 |
<tbody> |
| 13 |
<?php foreach ( $order_histories as $order_history ) : ?> |
| 14 |
<?php |
| 15 |
$order = wc_get_order( $order_history->order_id ); |
| 16 |
$order_item = $order->get_item( $order_history->order_item_id ); |
| 17 |
?> |
| 18 |
<tr> |
| 19 |
<td><a href="<?php echo wp_kses_post( $order->get_edit_order_url() ); ?>" target="_blank"><?php echo wp_kses_post( $order_history->order_id ); ?></a></td> |
| 20 |
<td><?php echo wp_kses_post( order_relation_type_cast( $order_history->type ) ); ?></td> |
| 21 |
<td> |
| 22 |
<?php |
| 23 |
if ( $order ) { |
| 24 |
echo wp_kses_post( gmdate( 'F d, Y', strtotime( $order->get_date_created() ) ) );} |
| 25 |
?> |
| 26 |
</td> |
| 27 |
<td> |
| 28 |
<?php |
| 29 |
if ( $order ) { |
| 30 |
echo esc_html( sdevs_order_status_label( $order->get_status() ) ); |
| 31 |
} |
| 32 |
?> |
| 33 |
</td> |
| 34 |
<td> |
| 35 |
<?php |
| 36 |
echo wc_price( |
| 37 |
$order_item->get_total(), |
| 38 |
array( |
| 39 |
'currency' => $order->get_currency(), |
| 40 |
) |
| 41 |
); |
| 42 |
?> |
| 43 |
</td> |
| 44 |
</tr> |
| 45 |
<?php endforeach; ?> |
| 46 |
</tbody> |
| 47 |
</table> |
| 48 |
|