PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.2.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.2.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/subscription-details.php +28 -33 1.11.2 → 2.2.0 View file →
@@ -39,8 +39,9 @@
39 39 'pending' => 'pending',
40 40 'pe_cancelled' => 'pending-cancel',
41 41 'cancelled' => 'cancelled',
42 42 'expired' => 'expired',
43 + 'completed' => 'completed',
43 44 'draft' => 'draft',
44 45 'trash' => 'trash',
45 46 );
46 47 $badge_mod = $badge_mod_map[ $subscrpt_status ] ?? 'expired';
@@ -102,11 +103,12 @@
102 103 $timing_per = (int) ( $subscription_data['schedule']['timing_per'] ?? 1 );
103 104 $timing_option = $subscription_data['schedule']['timing_option'] ?? '';
104 105 $period_label = '';
105 106 if ( $timing_option ) {
107 + $timing_unit = ucfirst( Helper::get_typos( $timing_per, $timing_option ) );
106 108 $period_label = $timing_per > 1
107 - ? $timing_per . ' ' . ucfirst( $timing_option ) . 's'
108 - : ucfirst( $timing_option );
109 + ? $timing_per . ' ' . $timing_unit
110 + : $timing_unit;
109 111 }
110 112
111 113 // Net of any discount that carries into renewals, with the original struck through.
112 114 $recurring_totals = Helper::get_subscription_display_totals( $subscription_id, $order_item );
@@ -134,14 +136,15 @@
134 136 'label' => __( 'Started', 'subscription' ),
135 137 'value' => esc_html( wp_date( get_option( 'date_format' ), strtotime( $subscription_data['start_date'] ) ) ),
136 138 );
137 139 }
138 -if ( ! empty( $subscription_data['next_date'] ) ) {
139 - $summary_tiles[] = array(
140 - 'label' => __( 'Next Payment', 'subscription' ),
141 - 'value' => esc_html( wp_date( get_option( 'date_format' ), strtotime( $subscription_data['next_date'] ) ) ),
142 - );
143 -}
140 +// Always show the Next Payment tile; dash when there is no next date.
141 +$summary_tiles[] = array(
142 + 'label' => __( 'Next Payment', 'subscription' ),
143 + 'value' => ! empty( $subscription_data['next_date'] )
144 + ? esc_html( wp_date( get_option( 'date_format' ), strtotime( $subscription_data['next_date'] ) ) )
145 + : '-',
146 +);
144 147 // Total payments is not part of $subscription_data; pull it from the info rows.
145 148 if ( isset( $rows['total_payments'] ) ) {
146 149 $summary_tiles[] = array(
147 150 'label' => __( 'Total Payments', 'subscription' ),
@@ -162,8 +165,9 @@
162 165
163 166 // Plan card: product + qty render side by side; trial/signup fee as extra rows.
164 167 $plan_product = isset( $rows['product'] ) ? $rows['product']['value'] : '';
165 168 $plan_qty = isset( $rows['quantity'] ) ? $rows['quantity']['value'] : '';
169 +$plan_label = function_exists( 'subscrpt_get_subscription_plan_label' ) ? subscrpt_get_subscription_plan_label( $subscription_id ) : '';
166 170 $plan_extra = array();
167 171 foreach ( array( 'product', 'quantity', 'signup_fee', 'trial', 'trial_period' ) as $plan_key ) {
168 172 $used_keys[ $plan_key ] = true;
169 173 if ( in_array( $plan_key, array( 'signup_fee', 'trial', 'trial_period' ), true ) && isset( $rows[ $plan_key ] ) ) {
@@ -297,32 +301,13 @@
297 301 ),
298 302 ),
299 303 )
300 304 );
301 - wpsubs_render_adv_select(
305 + wpsubs_render_per_page_select(
302 306 array(
303 - 'name' => 'subscrpt_per_page',
304 - 'value' => '10',
305 - 'align' => 'right',
306 - 'class' => 'subscrpt-filter-perpage',
307 - 'options' => array(
308 - array(
309 - 'value' => '10',
310 - 'label' => __( '10 / page', 'subscription' ),
311 - ),
312 - array(
313 - 'value' => '20',
314 - 'label' => __( '20 / page', 'subscription' ),
315 - ),
316 - array(
317 - 'value' => '50',
318 - 'label' => __( '50 / page', 'subscription' ),
319 - ),
320 - array(
321 - 'value' => '100',
322 - 'label' => __( '100 / page', 'subscription' ),
323 - ),
324 - ),
307 + 'name' => 'subscrpt_per_page',
308 + 'align' => 'right',
309 + 'class' => 'subscrpt-filter-perpage',
325 310 )
326 311 );
327 312 ?>
328 313 </div>
@@ -429,8 +414,16 @@
429 414 <?php endif; ?>
430 415 </div>
431 416 <div class="subscrpt-plan-meta">
432 417 <span class="subscrpt-plan-name"><?php echo $plan_product ? wp_kses_post( $plan_product ) : '&mdash;'; ?></span>
418 + <?php if ( $plan_label ) : ?>
419 + <span class="subscrpt-plan-term">
420 + <?php
421 + /* translators: %s: plan name */
422 + printf( esc_html__( 'Plan: %s', 'subscription' ), esc_html( $plan_label ) );
423 + ?>
424 + </span>
425 + <?php endif; ?>
433 426 <span class="subscrpt-plan-qty">
434 427 <?php
435 428 /* translators: %s: quantity */
436 429 printf( esc_html__( 'Quantity: %s', 'subscription' ), $plan_qty ? wp_kses_post( $plan_qty ) : '1' );
@@ -773,12 +766,13 @@
773 766
774 767 </div>
775 768
776 769 <style>
777 -/* Page sits on WP admin gray; the cards are the white surfaces (matches list/health pages). */
770 +/* Page sits on WP admin gray; the cards are the white surfaces (matches list/health pages).
771 + No `padding: 0` here — that overrode `.list-page`'s own `0 24px` and ran the
772 + whole page flush into the admin menu and the right edge of the window. */
778 773 .wp-subscription-admin-content.list-page.subscrpt-subs-details {
779 774 background: transparent;
780 - padding: 0;
781 775 border-radius: 0;
782 776 margin-top: 24px;
783 777 margin-bottom: 32px;
784 778 }
@@ -1010,8 +1004,9 @@
1010 1004 .subscrpt-plan-name { font-size: 14px; font-weight: 600; color: var(--wpsubs-text); line-height: 1.3; }
1011 1005 .subscrpt-plan-name a { color: var(--wpsubs-text); text-decoration: none; }
1012 1006 .subscrpt-plan-name a:hover { color: var(--wpsubs-brand); }
1013 1007 .subscrpt-plan-qty { font-size: 13px; color: var(--wpsubs-text-muted); }
1008 +.subscrpt-plan-term { font-size: 13px; color: var(--wpsubs-text-muted); }
1014 1009 .subscrpt-plan-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
1015 1010 .subscrpt-plan-label {
1016 1011 font-size: 11px;
1017 1012 font-weight: 600;