| @@ -68,11 +68,9 @@ | ||
| 68 | 68 | /* translators: %s: Subscription ID */ |
| 69 | 69 | : sprintf( __( 'Subscription #%s', 'subscription' ), $subscription_id ); |
| 70 | 70 | |
| 71 | 71 | $next_payment_date = $subscription_data['next_date'] ?? ''; |
| 72 | -$next_payment_date = ! empty( $next_payment_date ) && Helper::has_next_payment( $subscription_data['status'] ?? '' ) | |
| 73 | - ? wp_date( get_option( 'date_format' ), strtotime( $next_payment_date ) ) | |
| 74 | - : ''; | |
| 72 | +$next_payment_date = ! empty( $next_payment_date ) ? wp_date( get_option( 'date_format' ), strtotime( $next_payment_date ) ) : ''; | |
| 75 | 73 | |
| 76 | 74 | $header_badge = '<span class="wpsubs-badge wpsubs-badge--' . esc_attr( $badge_mod ) . '">' . esc_html( $verbose_status ); |
| 77 | 75 | if ( $is_grace_period && $grace_remaining > 0 ) { |
| 78 | 76 | /* translators: %d: days remaining */ |
| @@ -141,9 +139,11 @@ | ||
| 141 | 139 | } |
| 142 | 140 | // Always show the Next Payment tile; dash when there is no next date. |
| 143 | 141 | $summary_tiles[] = array( |
| 144 | 142 | 'label' => __( 'Next Payment', 'subscription' ), |
| 145 | - 'value' => $next_payment_date ? esc_html( $next_payment_date ) : '-', | |
| 143 | + 'value' => ! empty( $subscription_data['next_date'] ) | |
| 144 | + ? esc_html( wp_date( get_option( 'date_format' ), strtotime( $subscription_data['next_date'] ) ) ) | |
| 145 | + : '-', | |
| 146 | 146 | ); |
| 147 | 147 | // Total payments is not part of $subscription_data; pull it from the info rows. |
| 148 | 148 | if ( isset( $rows['total_payments'] ) ) { |
| 149 | 149 | $summary_tiles[] = array( |