Use ID instead of classname when saving settings for Checkout and Shipping.
This commit is contained in:
parent
067b406a5c
commit
346b25d01b
|
@ -349,7 +349,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
foreach ( $wc_payment_gateways->payment_gateways() as $gateway ) {
|
foreach ( $wc_payment_gateways->payment_gateways() as $gateway ) {
|
||||||
if ( $current_section === sanitize_title( get_class( $gateway ) ) ) {
|
if ( strtolower( $current_section ) === $gateway->id ) {
|
||||||
do_action( 'woocommerce_update_options_payment_gateways_' . $gateway->id );
|
do_action( 'woocommerce_update_options_payment_gateways_' . $gateway->id );
|
||||||
$wc_payment_gateways->init();
|
$wc_payment_gateways->init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
|
||||||
$wc_shipping = WC_Shipping::instance();
|
$wc_shipping = WC_Shipping::instance();
|
||||||
|
|
||||||
foreach ( $wc_shipping->get_shipping_methods() as $method_id => $method ) {
|
foreach ( $wc_shipping->get_shipping_methods() as $method_id => $method ) {
|
||||||
if ( $current_section === sanitize_title( get_class( $method ) ) ) {
|
if ( strtolower( $current_section ) === $method->id ) {
|
||||||
do_action( 'woocommerce_update_options_' . $this->id . '_' . $method->id );
|
do_action( 'woocommerce_update_options_' . $this->id . '_' . $method->id );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue