Extend theme info to include child theme and wc support.
This commit is contained in:
parent
c4b4071649
commit
144c683d7b
|
@ -143,7 +143,10 @@ class WC_Tracker {
|
|||
$theme_name = $theme_data->Name;
|
||||
$theme_version = $theme_data->Version;
|
||||
}
|
||||
return array( 'name' => $theme_name, 'version' => $theme_version );
|
||||
$theme_child_theme = is_child_theme() ? 'Yes' : 'No';
|
||||
$theme_wc_support = ( ! current_theme_supports( 'woocommerce' ) && ! in_array( $active_theme->template, wc_get_core_supported_themes() ) ) ? 'No' : 'Yes';
|
||||
|
||||
return array( 'name' => $theme_name, 'version' => $theme_version, 'child_theme' => $theme_child_theme, 'wc_support' => $theme_wc_support );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue