PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.3.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.3.0
2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 All 65 releases
← All changes | includes/Admin/views/related-subscriptions.php +3 -10 1.10.7 → 2.3.0 View file →
@@ -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>