Skip to content

Commit

Permalink
Fix fatal error when payment gateway is disabled and causing ->gatewa…
Browse files Browse the repository at this point in the history
…y to be null.
  • Loading branch information
ndeet committed Dec 13, 2023
1 parent 892524c commit c00f055
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 c00f055

Please sign in to comment.