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/Frontend/MyAccount.php +7 -2 1.11.2 → 2.4.0 View file →
@@ -112,9 +112,9 @@
112 112 $start_date = $subscription_data['start_date'] ?? '';
113 113 $start_date = ! empty( $start_date ) ? wp_date( 'F j, Y', strtotime( $start_date ) ) : '-';
114 114
115 115 $next_date = $subscription_data['next_date'] ?? '';
116 - $next_date = ! empty( $next_date ) ? wp_date( 'F j, Y', strtotime( $next_date ) ) : '-';
116 + $next_date = ! empty( $next_date ) && Helper::has_next_payment( $status ) ? wp_date( 'F j, Y', strtotime( $next_date ) ) : '-';
117 117
118 118 $trial = get_post_meta( $id, '_subscrpt_trial', true );
119 119 $trial_mode = get_post_meta( $id, '_subscrpt_trial_mode', true );
120 120
@@ -211,8 +211,13 @@
211 211 }
212 212
213 213 $action_buttons = apply_filters( 'subscrpt_single_action_buttons', $action_buttons, $id, $subscrpt_nonce, $status );
214 214
215 + // Nothing renews once a subscription has ended, so drop the auto-renewal toggle — Pro adds it through the filter too.
216 + if ( ! Helper::has_next_payment( $status ) ) {
217 + unset( $action_buttons['auto-renew-on'], $action_buttons['auto-renew-off'] );
218 + }
219 +
215 220 wc_get_template(
216 221 'myaccount/single.php',
217 222 array(
218 223 'id' => $id,
@@ -305,9 +310,9 @@
305 310 'author' => get_current_user_id(),
306 311 'posts_per_page' => 10,
307 312 'paged' => $current_page,
308 313 'post_type' => 'subscrpt_order',
309 - 'post_status' => array( 'pending', 'active', 'on_hold', 'cancelled', 'expired', 'pe_cancelled' ),
314 + 'post_status' => array( 'pending', 'active', 'on_hold', 'cancelled', 'expired', 'pe_cancelled', 'completed' ),
310 315 );
311 316
312 317 $postslist = new \WP_Query( $args );
313 318 wc_get_template(