Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::register_page_id()publicWC 1.0

Adds a page permalink to the data registry.

Method of the class: AssetDataRegistry{}

No Hooks.

Return

null. Nothing (null).

Usage

$AssetDataRegistry = new AssetDataRegistry();
$AssetDataRegistry->register_page_id( $page_id );
$page_id(int) (required)
Page ID to add to the registry.

AssetDataRegistry::register_page_id() code WC 8.7.0

public function register_page_id( $page_id ) {
	$permalink = $page_id ? get_permalink( $page_id ) : false;

	if ( $permalink ) {
		$this->data[ 'page-' . $page_id ] = $permalink;
	}
}