| 1 |
<?php |
| 2 |
/** |
| 3 |
* Display single row of order items. |
| 4 |
* |
| 5 |
* @author Nhamdv <4.0.0> |
| 6 |
* @version 4.0.0 |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! isset( $item ) ) { |
| 10 |
return; |
| 11 |
} |
| 12 |
?> |
| 13 |
|
| 14 |
<?php if ( ! empty( $item['course_id'] ) ) { ?> |
| 15 |
<tr class="order-item-row" data-item_id="<?php echo esc_attr( $item['id'] ); ?>" data-id="<?php echo esc_attr( $item['course_id'] ); ?>" data-remove_nonce="<?php echo wp_create_nonce( 'remove_order_item' ); ?>"> |
| 16 |
<td class="column-name"> |
| 17 |
<?php if ( isset( $order ) && 'pending' === $order->get_status() ) : ?> |
| 18 |
<a class="remove-order-item learn-press-tooltip" href="" data-tooltip="<?php esc_attr_e( 'Delete item', 'learnpress' ); ?>"> |
| 19 |
<span class="dashicons dashicons-no-alt"></span> |
| 20 |
</a> |
| 21 |
<?php endif; ?> |
| 22 |
|
| 23 |
<?php do_action( 'learn_press/before_order_details_item_title', $item ); ?> |
| 24 |
|
| 25 |
<a href="<?php echo apply_filters( 'learn_press/order_item_link', get_the_permalink( $item['course_id'] ), $item ); ?>"> |
| 26 |
<?php echo apply_filters( 'learn_press/order_item_name', esc_html( $item['name'] ), $item ); ?> |
| 27 |
</a> |
| 28 |
|
| 29 |
<?php do_action( 'learn_press/after_order_details_item_title', $item ); ?> |
| 30 |
</td> |
| 31 |
|
| 32 |
<td class="column-price align-right"> |
| 33 |
<?php echo learn_press_format_price( isset( $item['total'] ) ? $item['total'] : 0, isset( $currency_symbol ) ? $currency_symbol : '$' ); ?> |
| 34 |
</td> |
| 35 |
|
| 36 |
<td class="column-quantity align-right"> |
| 37 |
<small class="times">×</small> |
| 38 |
<?php echo esc_html( $item['quantity'] ); ?> |
| 39 |
</td> |
| 40 |
|
| 41 |
<td class="column-total align-right"><?php echo learn_press_format_price( isset( $item['total'] ) ? $item['total'] : 0, isset( $currency_symbol ) ? $currency_symbol : '$' ); ?></td> |
| 42 |
</tr> |
| 43 |
|
| 44 |
<?php |
| 45 |
} else { |
| 46 |
do_action( 'learn-press/order-item-not-course', $item ); |
| 47 |
} |
| 48 |
?> |
| 49 |
|