| @@ -64,17 +64,11 @@ | ||
| 64 | 64 | $trial = get_post_meta( get_the_ID(), '_subscrpt_trial', true ); |
| 65 | 65 | $trial_mode = get_post_meta( get_the_ID(), '_subscrpt_trial_mode', true ); |
| 66 | 66 | $trial_mode = empty( $trial_mode ) ? 'off' : $trial_mode; |
| 67 | 67 | |
| 68 | - $quantity = (int) $order_item->get_quantity(); | |
| 69 | - $price = (float) ( $subscription_data['price'] ?? 0 ) * max( 1, $quantity ); | |
| 70 | - $price_excl_tax = (float) $order_item->get_total(); | |
| 71 | - $tax_amount = (float) $order_item->get_total_tax(); | |
| 72 | - | |
| 73 | - if ( $tax_amount > 0 ) { | |
| 74 | - $price = $price_excl_tax + $tax_amount; | |
| 75 | - $price = number_format( (float) $price, 2, '.', '' ); | |
| 76 | - } | |
| 68 | + // Renewal total, already net of any discount that recurs. | |
| 69 | + $display_totals = SpringDevs\Subscription\Illuminate\Helper::get_subscription_display_totals( $subscription_id, $order_item ); | |
| 70 | + $price = $display_totals['total']; | |
| 77 | 71 | |
| 78 | 72 | $product_price_html = SpringDevs\Subscription\Illuminate\Helper::format_price_with_order_item( $price, $order_item->get_id() ); |
| 79 | 73 | |
| 80 | 74 | $is_grace_period = isset( $subscription_data['grace_period'] ); |