Automattic\WooCommerce\Blocks\Domain

Package::get_url()publicWC 1.0

Returns the url to the blocks plugin directory.

Method of the class: Package{}

No Hooks.

Return

String.

Usage

$Package = new Package();
$Package->get_url( $relative_url );
$relative_url(string)
If provided, the relative url will be appended to the plugin url.
Default: ''

Package::get_url() code WC 9.7.1

public function get_url( $relative_url = '' ) {
	if ( ! $this->plugin_dir_url ) {
		// Append index.php so WP does not return the parent directory.
		$this->plugin_dir_url = plugin_dir_url( $this->path . '/index.php' );
	}

	return $this->plugin_dir_url . $relative_url;
}