Load Checkout settings sections using Payment Gateways’ IDs rather than their class name.
This commit is contained in:
parent
013b861535
commit
f1a2a5f974
|
@ -50,7 +50,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
|
||||||
|
|
||||||
foreach ( $payment_gateways as $gateway ) {
|
foreach ( $payment_gateways as $gateway ) {
|
||||||
$title = empty( $gateway->method_title ) ? ucfirst( $gateway->id ) : $gateway->method_title;
|
$title = empty( $gateway->method_title ) ? ucfirst( $gateway->id ) : $gateway->method_title;
|
||||||
$sections[ strtolower( get_class( $gateway ) ) ] = esc_html( $title );
|
$sections[ strtolower( $gateway->id ) ] = esc_html( $title );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
|
||||||
|
|
||||||
foreach ( $payment_gateways as $gateway ) {
|
foreach ( $payment_gateways as $gateway ) {
|
||||||
|
|
||||||
if ( strtolower( get_class( $gateway ) ) == strtolower( $current_section ) ) {
|
if ( strtolower( $current_section ) === $gateway->id ) {
|
||||||
$gateway->admin_options();
|
$gateway->admin_options();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue