Automattic\WooCommerce\Admin\Features\MarketingRecommendations
Init::get_misc_recommendations_specs
Get misc recommendations specs or fetch remotely if they don't exist.
Метод класса: Init{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = Init::get_misc_recommendations_specs();
Список изменений
| С версии 9.5.0 | Введена. |
Код Init::get_misc_recommendations_specs() Init::get misc recommendations specs WC 10.5.0
public static function get_misc_recommendations_specs() {
if ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) ) {
return array();
}
$specs = MiscRecommendationsDataSourcePoller::get_instance()->get_specs_from_data_sources();
// Return empty specs if they don't yet exist.
if ( ! is_array( $specs ) ) {
return array();
}
return $specs;
}