Skip checking WooCommerce support if stylesheet does not exist (https://github.com/woocommerce/woocommerce-admin/pull/5783)
This commit is contained in:
parent
9bdd0ab8db
commit
82ae70e910
|
@ -574,7 +574,11 @@ class Onboarding {
|
|||
}
|
||||
|
||||
foreach ( $themes as $theme ) {
|
||||
$directory = new \RecursiveDirectoryIterator( $theme->theme_root . '/' . $theme->stylesheet );
|
||||
$stylesheet_file = $theme->theme_root . '/' . $theme->stylesheet;
|
||||
if ( ! file_exists( $stylesheet_file ) ) {
|
||||
continue;
|
||||
}
|
||||
$directory = new \RecursiveDirectoryIterator( $stylesheet_file );
|
||||
$iterator = new \RecursiveIteratorIterator( $directory );
|
||||
$files = new \RegexIterator( $iterator, '/^.+\.php$/i', \RecursiveRegexIterator::GET_MATCH );
|
||||
|
||||
|
|
Loading…
Reference in New Issue