| @@ -50,19 +50,10 @@ | ||
| 50 | 50 | |
| 51 | 51 | $next_date_string = $subscription_data['next_date'] ?? ''; |
| 52 | 52 | $next_date = ! empty( $next_date_string ) ? wp_date( 'F d, Y', strtotime( $next_date_string ) ) : '-'; |
| 53 | 53 | |
| 54 | - $quantity = (int) $order_item->get_quantity(); | |
| 55 | - $cost = (float) ( $subscription_data['price'] ?? 0 ) * max( 1, $quantity ); | |
| 56 | - $price_excl_tax = (float) $order_item->get_total(); | |
| 57 | - $tax_amount = (float) $order_item->get_total_tax(); | |
| 58 | - | |
| 59 | - if ( $tax_amount > 0 ) { | |
| 60 | - $cost = $price_excl_tax + $tax_amount; | |
| 61 | - $cost = number_format( (float) $cost, 2, '.', '' ); | |
| 62 | - } | |
| 63 | - | |
| 64 | - $recurring_amount_string = Helper::format_price_with_order_item( $cost, $order_item_id ); | |
| 54 | + // Strikes the original amount when a discount carries into renewals. | |
| 55 | + $recurring_amount_string = Helper::get_subscription_recurring_price_html( $subscription_id, $order_item ); | |
| 65 | 56 | |
| 66 | 57 | $is_grace_period = isset( $subscription_data['grace_period'] ); |
| 67 | 58 | $grace_remaining = $subscription_data['grace_period']['remaining_days'] ?? 0; |
| 68 | 59 | |