Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::hydrate_api_request()publicWC 1.0

Hydrate from the API.

Method of the class: AssetDataRegistry{}

No Hooks.

Return

null. Nothing (null).

Usage

$AssetDataRegistry = new AssetDataRegistry();
$AssetDataRegistry->hydrate_api_request( $path );
$path(string) (required)
REST API path to preload.

AssetDataRegistry::hydrate_api_request() code 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 );
	}
}