prevented errors in the installation caused by old plugins

This commit is contained in:
claudiosmweb 2014-09-10 13:35:46 -03:00
parent 914805f20c
commit 3c4177a579
1 changed files with 4 additions and 0 deletions

View File

@ -288,6 +288,10 @@ class WC_Install {
$settings = WC_Admin_Settings::get_settings_pages(); $settings = WC_Admin_Settings::get_settings_pages();
foreach ( $settings as $section ) { foreach ( $settings as $section ) {
if ( ! method_exists( $section, 'get_settings' ) ) {
continue;
}
foreach ( $section->get_settings() as $value ) { foreach ( $section->get_settings() as $value ) {
if ( isset( $value['default'] ) && isset( $value['id'] ) ) { if ( isset( $value['default'] ) && isset( $value['id'] ) ) {
$autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true; $autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true;