| @@ -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(); |
| @@ -380,10 +377,10 @@ | ||
| 380 | 377 | <p class="product-desc" style="font-size:1.15em;line-height:1.6;max-width:500px;"> |
| 381 | 378 | <?php esc_html_e( 'WPSubscription is the most seamless and reliable WooCommerce subscription solution for store owners looking to grow recurring revenue. Easily manage recurring payments, automate renewals, and delight your customers with flexible plans.', 'subscription' ); ?> |
| 382 | 379 | </p> |
| 383 | 380 | <div class="wpsubscription-links" style="display:flex;gap:12px;flex-wrap:wrap;"> |
| 384 | - <a href="https://docs.wpsubscription.co/en" target="_blank" class="button button-secondary"><?php esc_html_e( 'Documentation', 'subscription' ); ?></a> | |
| 385 | - <a href="https://wpsubscription.co/" target="_blank" class="button button-secondary"><?php esc_html_e( 'Website', 'subscription' ); ?></a> | |
| 381 | + <a href="https://docs.wpsubscription.co/en?utm_source=plugin&utm_medium=admin&utm_campaign=docs" target="_blank" class="button button-secondary"><?php esc_html_e( 'Documentation', 'subscription' ); ?></a> | |
| 382 | + <a href="https://wpsubscription.co/?utm_source=plugin&utm_medium=admin&utm_campaign=upgrade_pro" target="_blank" class="button button-secondary"><?php esc_html_e( 'Website', 'subscription' ); ?></a> | |
| 386 | 383 | </div> |
| 387 | 384 | </div> |
| 388 | 385 | <div class="promo-video" style="text-align:center;"> |
| 389 | 386 | <iframe width="420" height="236" src="https://www.youtube.com/embed/2e6o5p0M7L4" title="WPSubscription Promo" frameborder="0" allowfullscreen style="max-width:100%;border-radius:8px;"></iframe> |
| @@ -504,9 +501,9 @@ | ||
| 504 | 501 | </tr> |
| 505 | 502 | </tbody> |
| 506 | 503 | </table> |
| 507 | 504 | <div style="text-align:center;margin-top:24px;"> |
| 508 | - <a href="https://wpsubscription.co/" target="_blank" class="button button-primary button-hero" style="font-size:1.2em;padding:16px 40px 16px 40px;background:#7f54b3;border:none;box-shadow:0 2px 8px rgba(127,84,179,0.10);"> | |
| 505 | + <a href="https://wpsubscription.co/?utm_source=plugin&utm_medium=admin&utm_campaign=upgrade_pro" target="_blank" class="button button-primary button-hero" style="font-size:1.2em;padding:16px 40px 16px 40px;background:#7f54b3;border:none;box-shadow:0 2px 8px rgba(127,84,179,0.10);"> | |
| 509 | 506 | <?php esc_html_e( 'Upgrade to Pro', 'subscription' ); ?> |
| 510 | 507 | </a> |
| 511 | 508 | </div> |
| 512 | 509 | </div> |