WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WC_Marketplace_Updater::update_marketplace_suggestions() public WC 1.0

Fetches new marketplace data, updates wc_marketplace_suggestions.

Это метод класса: WC_Marketplace_Updater{}

Хуков нет.

Возвращает

Null. Ничего.

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

$result = WC_Marketplace_Updater::update_marketplace_suggestions();

Код WC_Marketplace_Updater::update_marketplace_suggestions() WC 4.5.2

woocommerce/includes/admin/marketplace-suggestions/class-wc-marketplace-updater.php
<?php
public static function update_marketplace_suggestions() {
	$data = get_option(
		'woocommerce_marketplace_suggestions',
		array(
			'suggestions' => array(),
			'updated'     => time(),
		)
	);

	$data['updated'] = time();

	$url     = 'https://woocommerce.com/wp-json/wccom/marketplace-suggestions/1.0/suggestions.json';
	$request = wp_safe_remote_get( $url );

	if ( is_wp_error( $request ) ) {
		self::retry();
		return update_option( 'woocommerce_marketplace_suggestions', $data, false );
	}

	$body = wp_remote_retrieve_body( $request );
	if ( empty( $body ) ) {
		self::retry();
		return update_option( 'woocommerce_marketplace_suggestions', $data, false );
	}

	$body = json_decode( $body, true );
	if ( empty( $body ) || ! is_array( $body ) ) {
		self::retry();
		return update_option( 'woocommerce_marketplace_suggestions', $data, false );
	}

	$data['suggestions'] = $body;
	return update_option( 'woocommerce_marketplace_suggestions', $data, false );
}