Add payment method to renewal order

This commit is contained in:
Emili Castells Guasch 2023-08-31 16:08:51 +02:00
parent 2571d31ad8
commit fe73de45ad

View file

@ -98,6 +98,7 @@ class PaymentSaleCompleted implements RequestHandler {
if ( $is_renewal ) {
$renewal_order = wcs_create_renewal_order( $subscription );
if ( is_a( $renewal_order, WC_Order::class ) ) {
$renewal_order->set_payment_method( $subscription->get_payment_method() );
$renewal_order->payment_complete();
$this->update_transaction_id( $transaction_id, $renewal_order, $this->logger );
break;