diff --git a/includes/admin/settings/class-wc-settings-checkout.php b/includes/admin/settings/class-wc-settings-checkout.php index 9262e462c8e..8b00c2ef1af 100644 --- a/includes/admin/settings/class-wc-settings-checkout.php +++ b/includes/admin/settings/class-wc-settings-checkout.php @@ -361,14 +361,12 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page { $wc_payment_gateways = WC_Payment_Gateways::instance(); if ( ! $current_section ) { - $settings = $this->get_settings(); - // Prevent the T&Cs and checkout page from being set to the same page. if ( isset( $_POST[ 'woocommerce_terms_page_id' ], $_POST[ 'woocommerce_checkout_page_id' ] ) && $_POST[ 'woocommerce_terms_page_id' ] === $_POST[ 'woocommerce_checkout_page_id' ] ) { $_POST[ 'woocommerce_terms_page_id' ] = ''; } - WC_Admin_Settings::save_fields( $settings ); + WC_Admin_Settings::save_fields( $this->get_settings() ); $wc_payment_gateways->process_admin_options(); } else {