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/Subscriptions.php +5 -8 2.0.0 → 2.3.0 View file →
@@ -158,9 +158,9 @@
158 158 <?php endif; ?>
159 159 <?php
160 160 } elseif ( 'subscrpt_next_date' === $column ) {
161 161 $next_date = get_post_meta( $post_id, '_subscrpt_next_date', true );
162 - echo ! empty( $next_date ) ? esc_html( wp_date( 'F d, Y', $next_date ) ) : '-';
162 + echo ! empty( $next_date ) && Helper::has_next_payment( get_post_status( $post_id ) ) ? esc_html( wp_date( 'F d, Y', $next_date ) ) : '-';
163 163 } elseif ( 'subscrpt_status' === $column ) {
164 164 $status_obj = get_post_status_object( get_post_status( $post_id ) );
165 165 ?>
166 166 <span
@@ -305,15 +305,12 @@
305 305 */
306 306 public static function process_status_change( $post_id, $action ) {
307 307 $old_status = get_post_status( $post_id );
308 308
309 - wp_update_post(
310 - array(
311 - 'ID' => $post_id,
312 - 'post_status' => $action,
313 - )
314 - );
315 -
309 + // Do not wp_update_post() the status here: Action::status() and the order
310 + // cascade below both skip their hooks (incl. next-date generation) when
311 + // the post_status already equals the target, so this must stay the only
312 + // place a real transition happens.
316 313 if ( $old_status !== $action ) {
317 314 $old_status_object = get_post_status_object( $old_status );
318 315 $new_status_object = get_post_status_object( $action );
319 316 WC()->mailer();