Automattic\WooCommerce\Blocks\Assets
AssetDataRegistry::hydrate_api_request()
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() AssetDataRegistry::hydrate api request code WC 9.2.3
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 ); } }