WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::hydrate_api_request() public WC 1.0

Hydrate from API.

{} It's a method of the class: AssetDataRegistry{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of AssetDataRegistry::hydrate_api_request() WC 5.6.0

public function hydrate_api_request( $path ) {
	if ( ! isset( $this->data['preloadedApiRequests'] ) ) {
		$this->data['preloadedApiRequests'] = [];
	}
	if ( ! isset( $this->data['preloadedApiRequests'][ $path ] ) ) {
		$this->data['preloadedApiRequests'] = rest_preload_api_request( $this->data['preloadedApiRequests'], $path );
	}
}