diff --git a/includes/admin/settings/class-wc-settings-checkout.php b/includes/admin/settings/class-wc-settings-checkout.php index 23841abfb78..c2e87211e54 100644 --- a/includes/admin/settings/class-wc-settings-checkout.php +++ b/includes/admin/settings/class-wc-settings-checkout.php @@ -349,7 +349,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page { } else { 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 ); $wc_payment_gateways->init(); } diff --git a/includes/admin/settings/class-wc-settings-shipping.php b/includes/admin/settings/class-wc-settings-shipping.php index 7dc24ee7266..22877addef4 100644 --- a/includes/admin/settings/class-wc-settings-shipping.php +++ b/includes/admin/settings/class-wc-settings-shipping.php @@ -166,7 +166,7 @@ class WC_Settings_Shipping extends WC_Settings_Page { $wc_shipping = WC_Shipping::instance(); 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 ); } }