Prevent possible fatal error during install

This commit is contained in:
Jorge A. Torres 2022-04-19 11:22:04 -03:00
parent 85324ea2cf
commit fd57c5409a
1 changed files with 1 additions and 1 deletions

View File

@ -700,7 +700,7 @@ class WC_Install {
$settings = WC_Admin_Settings::get_settings_pages();
foreach ( $settings as $section ) {
if ( ! method_exists( $section, 'get_settings' ) ) {
if ( ! is_a( $section, 'WC_Settings_Page' ) || ! method_exists( $section, 'get_settings' ) ) {
continue;
}
$subsections = array_unique( array_merge( array( '' ), array_keys( $section->get_sections() ) ) );