Skip to content

Commit

Permalink
Fix card payment gateway hiding on the admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Karimov committed Nov 16, 2022
1 parent a4222e7 commit 1bebfee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wc-payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ public static function register_gateway( $gateways ) {
*/
public static function hide_gateways_on_settings_page() {
foreach ( WC()->payment_gateways->payment_gateways as $index => $payment_gateway ) {
if ( $payment_gateway instanceof WC_Payment_Gateway_WCPay && self::get_gateway() !== self::$legacy_card_gateway ) {
if ( $payment_gateway instanceof WC_Payment_Gateway_WCPay && $payment_gateway !== self::$legacy_card_gateway ) {
unset( WC()->payment_gateways->payment_gateways[ $index ] );
}
}
Expand Down

0 comments on commit 1bebfee

Please sign in to comment.