WC_Tracker::get_theme_info() – Get the current theme info, theme name and version.

You appear to be a bot. Output may be restricted

Description

Get the current theme info, theme name and version.

Usage

$array = WC_Tracker::get_theme_info();

Parameters

Returns

array

Source

File name: woocommerce/includes/class-wc-tracker.php
Lines:

1 to 12 of 12
  public static function get_theme_info() {
    $theme_data        = wp_get_theme();
    $theme_child_theme = wc_bool_to_string( is_child_theme() );
    $theme_wc_support  = wc_bool_to_string( current_theme_supports( 'woocommerce' ) );

    return array(
      'name'        => $theme_data->Name, // @phpcs:ignore
      'version'     => $theme_data->Version, // @phpcs:ignore
      'child_theme' => $theme_child_theme,
      'wc_support'  => $theme_wc_support,
    );
  }
 

 View on GitHub View on Trac