Automattic\WooCommerce\Admin\Features\MarketingRecommendations

Init::get_specs()public staticWC 1.0

Get specs or fetch remotely if they don't exist.

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

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = Init::get_specs();

Код Init::get_specs() WC 9.8.5

public static function get_specs() {
	if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) {
		return DefaultMarketingRecommendations::get_all();
	}
	$specs = MarketingRecommendationsDataSourcePoller::get_instance()->get_specs_from_data_sources();

	// Fetch specs if they don't yet exist.
	if ( ! is_array( $specs ) || 0 === count( $specs ) ) {
		return DefaultMarketingRecommendations::get_all();
	}

	return $specs;
}