Skip to content

Commit

Permalink
Merge pull request #38 from pronamic/37-inactive-payment-method-billi…
Browse files Browse the repository at this point in the history
…e-listed-on-form

All payment methods are inactive by default.
  • Loading branch information
rvdsteege authored Aug 30, 2023
2 parents 2545682 + d15c1cc commit d58aa9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ private function maybe_enrich_payment_methods() {
\set_transient( $cache_key, $mollie_payment_methods, \DAY_IN_SECONDS );
}

// All payment methods are inactive by default.
foreach ( $this->payment_methods as $payment_method ) {
$payment_method->set_status( 'inactive' );
}

$method_transformer = new MethodTransformer();

foreach ( $mollie_payment_methods->_embedded->methods as $mollie_payment_method ) {
Expand Down

0 comments on commit d58aa9a

Please sign in to comment.