Add WooCommerce support if store is using default theme (https://github.com/woocommerce/woocommerce-admin/pull/3908)

* Add WooCommerce support if store is using default theme

* Check if wc_is_wp_default_theme_active exists before calling it
This commit is contained in:
Joshua T Flowers 2020-03-23 22:07:43 +02:00 committed by GitHub
parent 1db98a78d9
commit 66e8525d89
1 changed files with 5 additions and 0 deletions

View File

@ -309,6 +309,11 @@ class Onboarding {
$themes[ $slug ] = $theme_data;
}
// Add the WooCommerce support tag for default themes that don't explicitly declare support.
if ( function_exists( 'wc_is_wp_default_theme_active' ) && wc_is_wp_default_theme_active() ) {
$themes[ $active_theme ]['has_woocommerce_support'] = true;
}
$themes = array( $active_theme => $themes[ $active_theme ] ) + $themes;
set_transient( self::THEMES_TRANSIENT, $themes, DAY_IN_SECONDS );