Automattic\WooCommerce\Blocks\Assets
AssetDataRegistry::hydrate_api_request
Hydrate from the API.
Method of the class: AssetDataRegistry{}
No Hooks.
Returns
null. Nothing (null).
Usage
$AssetDataRegistry = new AssetDataRegistry(); $AssetDataRegistry->hydrate_api_request( $path );
- $path(string) (required)
- REST API path to preload.
AssetDataRegistry::hydrate_api_request() AssetDataRegistry::hydrate api request code WC 10.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 );
}
}