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:
parent
1db98a78d9
commit
66e8525d89
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue