PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.4.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.4.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 -11 1.9.6 → 2.4.0 View file →
@@ -47,17 +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 - $price = $subscription_data['price'] ?? 0;
52 - $price_excl_tax = (float) $order_item->get_total();
53 - $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 );
54 53
55 - if ( $tax_amount > 0 ) {
56 - $price = $price_excl_tax + $tax_amount;
57 - $price = number_format( (float) $price, 2, '.', '' );
58 - }
59 -
60 54 $is_grace_period = isset( $subscription_data['grace_period'] );
61 55 $grace_remaining = $subscription_data['grace_period']['remaining_days'] ?? 0;
62 56 ?>
63 57 <tr>
@@ -67,9 +61,9 @@
67 61 <td>
68 62 <?php echo esc_html( $order_item->get_name() ); ?>
69 63 </td>
70 64 <td>
71 - <?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 ); ?>
72 66 </td>
73 67 <td>
74 68 <?php echo esc_html( $start_date ); ?>
75 69 </td>
@@ -77,9 +71,9 @@
77 71 <?php echo esc_html( $next_date ); ?>
78 72 </td>
79 73 <td>
80 74 <?php if ( $is_grace_period && $grace_remaining > 0 ) : ?>
81 - <span class="subscrpt-active grace-active">
75 + <span class="subscrpt-legacy-status subscrpt-legacy-status--active grace-active">
82 76 Active
83 77
84 78 <?php
85 79 $grace_remaining_text = sprintf(
@@ -92,9 +86,9 @@
92 86 <span class="dashicons dashicons-warning"></span>
93 87 </span>
94 88 </span>
95 89 <?php else : ?>
96 - <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 ) ); ?>">
97 91 <?php echo esc_html( $verbose_status ); ?>
98 92 </span>
99 93 <?php endif; ?>
100 94 </td>