Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::hydrate_api_request()publicWC 1.0

Hydrate from the API.

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

Хуков нет.

Возвращает

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

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

$AssetDataRegistry = new AssetDataRegistry();
$AssetDataRegistry->hydrate_api_request( $path );
$path(строка) (обязательный)
REST API path to preload.

Код AssetDataRegistry::hydrate_api_request() WC 8.7.0

public function hydrate_api_request( $path ) {
	if ( ! isset( $this->preloaded_api_requests[ $path ] ) ) {
		$this->preloaded_api_requests[ $path ] = Package::container()->get( Hydration::class )->get_rest_api_response_data( $path );
	}
}