Use ID instead of classname when saving settings for Checkout and Shipping.

This commit is contained in:
Jeff Stieler 2016-02-19 11:46:52 -07:00
parent 067b406a5c
commit 346b25d01b
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}

View File

@ -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 );
}
}