DownloadsWrapper::enqueue_data()protectedWC 1.0

Extra data passed through from server to client for block.

Method of the class: DownloadsWrapper{}

No Hooks.


null. Nothing (null).


// protected - for code of main (parent) or child class
$result = $this->enqueue_data( $attributes );
Any attributes that currently are available from the block. Note, this will be empty in the editor context when the block is not in the post content on editor load.
Default: []

DownloadsWrapper::enqueue_data() code WC 8.9.0

protected function enqueue_data( array $attributes = [] ) {
	parent::enqueue_data( $attributes );

	$this->asset_data_registry->add( 'storeHasDownloadableProducts', $this->store_has_downloadable_products() );