Skip to content

Commit

Permalink
Update subscription status to on-hold before creating renewal order
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinamiko committed Jan 2, 2025
1 parent da01d26 commit c6466d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/ppcp-paypal-subscriptions/src/RenewalHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public function __construct( LoggerInterface $logger ) {
public function process( array $subscriptions, string $transaction_id ): void {
foreach ( $subscriptions as $subscription ) {
if ( $this->is_for_renewal_order( $subscription ) ) {
$subscription->update_status( 'on-hold' );

$renewal_order = wcs_create_renewal_order( $subscription );
if ( is_a( $renewal_order, WC_Order::class ) ) {
$this->logger->info(
Expand Down

0 comments on commit c6466d1

Please sign in to comment.