Remove unnecessary variable

Don’t this change any longer. Got rid of a foreach loop that was using it.
This commit is contained in:
Caleb Burks 2017-07-04 01:44:10 -05:00
parent c7693b201d
commit 02ffdaf8f5
1 changed files with 1 additions and 3 deletions

View File

@ -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 {