From 7209369eab3bfb7091e9c28de4681786f54bca37 Mon Sep 17 00:00:00 2001 From: Jeff Stieler Date: Wed, 8 Jun 2016 10:25:07 -0600 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20register=20legacy=20settings=20?= =?UTF-8?q?without=20IDs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/class-wc-register-legacy-settings.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-wc-register-legacy-settings.php b/includes/class-wc-register-legacy-settings.php index ba314b0f030..a9d262ac632 100644 --- a/includes/class-wc-register-legacy-settings.php +++ b/includes/class-wc-register-legacy-settings.php @@ -56,6 +56,9 @@ class WC_Register_Legacy_Settings { foreach ( $legacy_sections as $legacy_section => $legacy_section_label ) { $legacy_settings = $this->page->get_settings( $legacy_section ); foreach ( $legacy_settings as $legacy_setting ) { + if ( ! isset( $legacy_setting['id'] ) ) { + continue; + } $new_setting = array( 'id' => $legacy_setting['id'], 'label' => ( ! empty( $legacy_setting['title'] ) ? $legacy_setting['title'] : '' ),