Skip to content

Commit

Permalink
Merge pull request #212 from ved-beejadhur-cko/ECPINT-2564
Browse files Browse the repository at this point in the history
ECPINT-2564: add auto capture for subscription renewals
  • Loading branch information
avish-bisbeehurry-cko authored Apr 14, 2021
2 parents 0b1f543 + c4487f1 commit aa7b8c1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ private static function get_request_param(WC_Order $order, $arg, $subscription =
$payment->merchant_initiated = true;
$payment->payment_type = "Recurring";
$payment->previous_payment_id = get_post_meta( $arg['parent_order_id'], '_cko_payment_id', true ) ?? null;
$payment->capture = true;

} elseif (wcs_order_contains_subscription( $order, 'parent' )) {
$payment->merchant_initiated = false;
$payment->payment_type = "Recurring";
Expand Down

0 comments on commit aa7b8c1

Please sign in to comment.