| @@ -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(); |
| @@ -398,12 +395,12 @@ | ||
| 398 | 395 | </div> |
| 399 | 396 | |
| 400 | 397 | <h2 style="margin-top:2em;"><?php esc_html_e( 'Highlights', 'subscription' ); ?></h2> |
| 401 | 398 | <div class="wpsubscription-features-grid"> |
| 402 | - <div class="feature-box"><span class="dashicons dashicons-admin-generic"></span><h3>Easy Setup</h3><p>Get started in minutes with our intuitive onboarding wizard.</p></div> | |
| 403 | - <div class="feature-box"><span class="dashicons dashicons-money"></span><h3>Multiple Gateways</h3><p>Support for Stripe, PayPal, and Paddle out of the box.</p></div> | |
| 404 | - <div class="feature-box"><span class="dashicons dashicons-schedule"></span><h3>Flexible Plans</h3><p>Create and manage various subscription types and delivery schedules.</p></div> | |
| 405 | - <div class="feature-box"><span class="dashicons dashicons-chart-line"></span><h3>Comprehensive Dashboard</h3><p>Monitor and manage all subscriptions in one place.</p></div> | |
| 399 | + <div class="feature-box"><span class="dashicons dashicons-admin-generic"></span><h3><?php esc_html_e( 'Easy Setup', 'subscription' ); ?></h3><p><?php esc_html_e( 'Get started in minutes with our intuitive onboarding wizard.', 'subscription' ); ?></p></div> | |
| 400 | + <div class="feature-box"><span class="dashicons dashicons-money"></span><h3><?php esc_html_e( 'Multiple Gateways', 'subscription' ); ?></h3><p><?php esc_html_e( 'Support for Stripe, PayPal, and Paddle out of the box.', 'subscription' ); ?></p></div> | |
| 401 | + <div class="feature-box"><span class="dashicons dashicons-schedule"></span><h3><?php esc_html_e( 'Flexible Plans', 'subscription' ); ?></h3><p><?php esc_html_e( 'Create and manage various subscription types and delivery schedules.', 'subscription' ); ?></p></div> | |
| 402 | + <div class="feature-box"><span class="dashicons dashicons-chart-line"></span><h3><?php esc_html_e( 'Comprehensive Dashboard', 'subscription' ); ?></h3><p><?php esc_html_e( 'Monitor and manage all subscriptions in one place.', 'subscription' ); ?></p></div> | |
| 406 | 403 | </div> |
| 407 | 404 | </div> |
| 408 | 405 | </div> |
| 409 | 406 | <style> |
| @@ -447,9 +444,9 @@ | ||
| 447 | 444 | } |
| 448 | 445 | |
| 449 | 446 | public function render_go_pro_page() { |
| 450 | 447 | if ( class_exists( 'Sdevs_Wc_Subscription_Pro' ) ) { |
| 451 | - echo '<div class="notice notice-info" style="margin:40px auto;max-width:700px;text-align:center;font-size:1.2em;">Pro is already active.</div>'; | |
| 448 | + echo '<div class="notice notice-info" style="margin:40px auto;max-width:700px;text-align:center;font-size:1.2em;">' . esc_html__( 'Pro is already active.', 'subscription' ) . '</div>'; | |
| 452 | 449 | return; |
| 453 | 450 | } |
| 454 | 451 | ?> |
| 455 | 452 | <div class="wrap wpsubscription-go-pro" style="max-width:900px;margin:40px auto 0 auto;"> |
| @@ -461,45 +458,45 @@ | ||
| 461 | 458 | <table class="wpsubscription-compare-table" style="width:100%;margin:32px 0 40px 0;border-collapse:separate;border-spacing:0;box-shadow:0 1px 4px rgba(0,0,0,0.04);background:#fafbfc;border-radius:8px;overflow:hidden;"> |
| 462 | 459 | <thead> |
| 463 | 460 | <tr style="background:#f8f9fa;"> |
| 464 | 461 | <th style="padding:18px 12px 18px 24px;font-size:1.08em;text-align:left;border:none;"></th> |
| 465 | - <th style="padding:18px 12px;font-size:1.08em;text-align:center;border:none;">Free</th> | |
| 466 | - <th style="padding:18px 12px;font-size:1.08em;text-align:center;border:none;color:#7f54b3;">Pro</th> | |
| 462 | + <th style="padding:18px 12px;font-size:1.08em;text-align:center;border:none;"><?php esc_html_e( 'Free', 'subscription' ); ?></th> | |
| 463 | + <th style="padding:18px 12px;font-size:1.08em;text-align:center;border:none;color:#7f54b3;"><?php esc_html_e( 'Pro', 'subscription' ); ?></th> | |
| 467 | 464 | </tr> |
| 468 | 465 | </thead> |
| 469 | 466 | <tbody> |
| 470 | 467 | <tr> |
| 471 | - <td style="padding:16px 12px 16px 24px;">Simple subscription products</td> | |
| 468 | + <td style="padding:16px 12px 16px 24px;"><?php esc_html_e( 'Simple subscription products', 'subscription' ); ?></td> | |
| 472 | 469 | <td style="text-align:center;">✔️</td> |
| 473 | 470 | <td style="text-align:center;">✔️</td> |
| 474 | 471 | </tr> |
| 475 | 472 | <tr style="background:#f6f7f7;"> |
| 476 | - <td style="padding:16px 12px 16px 24px;">Automated recurring billing</td> | |
| 473 | + <td style="padding:16px 12px 16px 24px;"><?php esc_html_e( 'Automated recurring billing', 'subscription' ); ?></td> | |
| 477 | 474 | <td style="text-align:center;">✔️</td> |
| 478 | 475 | <td style="text-align:center;">✔️</td> |
| 479 | 476 | </tr> |
| 480 | 477 | <tr> |
| 481 | - <td style="padding:16px 12px 16px 24px;">Multiple payment gateways</td> | |
| 478 | + <td style="padding:16px 12px 16px 24px;"><?php esc_html_e( 'Multiple payment gateways', 'subscription' ); ?></td> | |
| 482 | 479 | <td style="text-align:center;">✔️</td> |
| 483 | 480 | <td style="text-align:center;">✔️</td> |
| 484 | 481 | </tr> |
| 485 | 482 | <tr style="background:#f6f7f7;"> |
| 486 | - <td style="padding:16px 12px 16px 24px;">Customer self-service portal</td> | |
| 483 | + <td style="padding:16px 12px 16px 24px;"><?php esc_html_e( 'Customer self-service portal', 'subscription' ); ?></td> | |
| 487 | 484 | <td style="text-align:center;">✔️</td> |
| 488 | 485 | <td style="text-align:center;">✔️</td> |
| 489 | 486 | </tr> |
| 490 | 487 | <tr> |
| 491 | - <td style="padding:16px 12px 16px 24px;">Priority support</td> | |
| 488 | + <td style="padding:16px 12px 16px 24px;"><?php esc_html_e( 'Priority support', 'subscription' ); ?></td> | |
| 492 | 489 | <td style="text-align:center;">—</td> |
| 493 | 490 | <td style="text-align:center;">✔️</td> |
| 494 | 491 | </tr> |
| 495 | 492 | <tr style="background:#f6f7f7;"> |
| 496 | - <td style="padding:16px 12px 16px 24px;">Advanced reporting & analytics</td> | |
| 493 | + <td style="padding:16px 12px 16px 24px;"><?php esc_html_e( 'Advanced reporting & analytics', 'subscription' ); ?></td> | |
| 497 | 494 | <td style="text-align:center;">—</td> |
| 498 | 495 | <td style="text-align:center;">✔️</td> |
| 499 | 496 | </tr> |
| 500 | 497 | <tr> |
| 501 | - <td style="padding:16px 12px 16px 24px;">Variable product support</td> | |
| 498 | + <td style="padding:16px 12px 16px 24px;"><?php esc_html_e( 'Variable product support', 'subscription' ); ?></td> | |
| 502 | 499 | <td style="text-align:center;">—</td> |
| 503 | 500 | <td style="text-align:center;font-weight:600;color:#43a047;">✔️</td> |
| 504 | 501 | </tr> |
| 505 | 502 | </tbody> |