Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingThemes::get_allowed_themes()public staticWC 1.0

Gets an array of themes that can be installed & activated via the onboarding wizard.

Метод класса: OnboardingThemes{}

Return

Array.

Usage

$result = OnboardingThemes::get_allowed_themes();

Code of OnboardingThemes::get_allowed_themes() WC 7.1.0

public static function get_allowed_themes() {
	$allowed_themes = array();
	$themes         = self::get_themes();

	foreach ( $themes as $theme ) {
		$price = preg_replace( '/&#?[a-z0-9]+;/i', '', $theme['price'] );

		if ( $theme['is_installed'] || '0.00' === $price ) {
			$allowed_themes[] = $theme['slug'];
		}
	}

	return apply_filters( 'woocommerce_admin_onboarding_themes_whitelist', $allowed_themes );
}