| @@ -47,18 +47,11 @@ | ||
| 47 | 47 | |
| 48 | 48 | $next_date = $subscription_data['next_date'] ?? ''; |
| 49 | 49 | $next_date = ! empty( $next_date ) ? wp_date( 'F j, Y - g:i A', strtotime( $next_date ) ) : '-'; |
| 50 | 50 | |
| 51 | - $quantity = (int) $order_item->get_quantity(); | |
| 52 | - $price = (float) ( $subscription_data['price'] ?? 0 ) * max( 1, $quantity ); | |
| 53 | - $price_excl_tax = (float) $order_item->get_total(); | |
| 54 | - $tax_amount = (float) $order_item->get_total_tax(); | |
| 51 | + // Strikes the original amount when a discount carries into renewals. | |
| 52 | + $price_html = SpringDevs\Subscription\Illuminate\Helper::get_subscription_recurring_price_html( $subscription_id, $order_item ); | |
| 55 | 53 | |
| 56 | - if ( $tax_amount > 0 ) { | |
| 57 | - $price = $price_excl_tax + $tax_amount; | |
| 58 | - $price = number_format( (float) $price, 2, '.', '' ); | |
| 59 | - } | |
| 60 | - | |
| 61 | 54 | $is_grace_period = isset( $subscription_data['grace_period'] ); |
| 62 | 55 | $grace_remaining = $subscription_data['grace_period']['remaining_days'] ?? 0; |
| 63 | 56 | ?> |
| 64 | 57 | <tr> |
| @@ -68,9 +61,9 @@ | ||
| 68 | 61 | <td> |
| 69 | 62 | <?php echo esc_html( $order_item->get_name() ); ?> |
| 70 | 63 | </td> |
| 71 | 64 | <td> |
| 72 | - <?php echo wp_kses_post( SpringDevs\Subscription\Illuminate\Helper::format_price_with_order_item( $price, $order_item->get_id() ) ); ?> | |
| 65 | + <?php echo wp_kses_post( $price_html ); ?> | |
| 73 | 66 | </td> |
| 74 | 67 | <td> |
| 75 | 68 | <?php echo esc_html( $start_date ); ?> |
| 76 | 69 | </td> |