Skip to content

Commit

Permalink
No longer ignore "Pronamic" payment method when updating MemberPress …
Browse files Browse the repository at this point in the history
…subscription gateway.
  • Loading branch information
rvdsteege committed Aug 7, 2024
1 parent 942843e commit 5725cdb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,17 @@ public function maybe_create_memberpress_transaction( Payment $payment ) {
continue;
}

if ( $memberpress_gateway->get_payment_method() === $payment->get_payment_method() ) {
$memberpress_subscription->gateway = $memberpress_gateway->id;
$gateway_method = $memberpress_gateway->get_payment_method();
$payment_method = $payment->get_payment_method();

if ( ! \in_array( $gateway_method, [ null, $payment_method ] ) ) {
continue;
}

$memberpress_subscription->gateway = $memberpress_gateway->id;

if ( $gateway_method === $payment_method ) {
break;
}
}

Expand Down

0 comments on commit 5725cdb

Please sign in to comment.