Merge pull request #32685 from woocommerce/fix/32028-settings-method-exists-fatal
Address possible type error during install on PHP 8.x
This commit is contained in:
commit
68234755d9
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix possible fatal error during install on PHP 8.x
|
|
@ -702,7 +702,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() ) ) );
|
||||
|
|
Loading…
Reference in New Issue