Automattic\WooCommerce\Blocks\Domain

Package::get_url()publicWC 1.0

Returns the url to the blocks plugin directory.

Метод класса: Package{}

Хуков нет.

Возвращает

Строку.

Использование

$Package = new Package();
$Package->get_url( $relative_url );
$relative_url(строка)
If provided, the relative url will be appended to the plugin url.
По умолчанию: ''

Код Package::get_url() WC 8.7.0

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;
}