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 +5 -12 1.10.2 → 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>
@@ -78,9 +71,9 @@
78 71 <?php echo esc_html( $next_date ); ?>
79 72 </td>
80 73 <td>
81 74 <?php if ( $is_grace_period && $grace_remaining > 0 ) : ?>
82 - <span class="subscrpt-active grace-active">
75 + <span class="subscrpt-legacy-status subscrpt-legacy-status--active grace-active">
83 76 Active
84 77
85 78 <?php
86 79 $grace_remaining_text = sprintf(
@@ -93,9 +86,9 @@
93 86 <span class="dashicons dashicons-warning"></span>
94 87 </span>
95 88 </span>
96 89 <?php else : ?>
97 - <span class="subscrpt-<?php echo esc_attr( strtolower( $subscrpt_status ) ); ?>">
90 + <span class="subscrpt-legacy-status subscrpt-legacy-status--<?php echo esc_attr( strtolower( $subscrpt_status ) ); ?>">
98 91 <?php echo esc_html( $verbose_status ); ?>
99 92 </span>
100 93 <?php endif; ?>
101 94 </td>