Skip to content

Commit

Permalink
Merge pull request #24 from ndeet/fix-disabled-gateway
Browse files Browse the repository at this point in the history
Fix fatal error when payment gateway is disabled
  • Loading branch information
jimjasson authored Dec 15, 2023
2 parents 892524c + c00f055 commit 53e8201
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/blocks/class-wc-dummy-payments-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ final class WC_Gateway_Dummy_Blocks_Support extends AbstractPaymentMethodType {
*/
public function initialize() {
$this->settings = get_option( 'woocommerce_dummy_settings', [] );
$gateways = WC()->payment_gateways->get_available_payment_gateways();
$this->gateway = $gateways['dummy'];
$gateways = WC()->payment_gateways->payment_gateways();
$this->gateway = $gateways[$this->name];
}

/**
Expand Down

0 comments on commit 53e8201

Please sign in to comment.