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