Skip to content

Commit feb1cd5

Browse files
authored
Add instanceof check before trying to update the UPE payment methods (#4236)
1 parent 3ac1ded commit feb1cd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

includes/admin/class-wc-rest-stripe-settings-controller.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,9 @@ private function update_enabled_payment_methods( $payment_method_ids_to_enable,
647647
return;
648648
}
649649

650-
$this->gateway->update_enabled_payment_methods( $payment_method_ids_to_enable );
650+
if ( $this->gateway instanceof WC_Stripe_UPE_Payment_Gateway ) {
651+
$this->gateway->update_enabled_payment_methods( $payment_method_ids_to_enable );
652+
}
651653
}
652654

653655
/**

0 commit comments

Comments
 (0)