Automattic\WooCommerce\Internal\Admin\Onboarding
OnboardingThemes::get_theme_data()
Get theme data used in onboarding theme browser.
Method of the class: OnboardingThemes{}
No Hooks.
Return
Array
.
Usage
$result = OnboardingThemes::get_theme_data( $theme );
- $theme(WP_Theme) (required)
- Theme to gather data from.
OnboardingThemes::get_theme_data() OnboardingThemes::get theme data code WC 8.7.0
public static function get_theme_data( $theme ) { return array( 'slug' => sanitize_text_field( $theme->stylesheet ), 'title' => $theme->get( 'Name' ), 'price' => '0.00', 'is_installed' => true, 'image' => $theme->get_screenshot(), 'has_woocommerce_support' => true, ); }