woocommerce_get_asset_url filter-hookWC 3.2.0

Filters the asset URL.

Usage

add_filter( 'woocommerce_get_asset_url', 'wp_kama_woocommerce_get_asset_url_filter', 10, 2 );

/**
 * Function for `woocommerce_get_asset_url` filter-hook.
 * 
 * @param string $url  The asset URL.
 * @param string $path The asset path.
 *
 * @return string
 */
function wp_kama_woocommerce_get_asset_url_filter( $url, $path ){

	// filter...
	return $url;
}
$url(string)
The asset URL.
$path(string)
The asset path.

Changelog

Since 3.2.0 Introduced.

Where the hook is called

AbstractAutomatticAddressProvider::get_asset_url()
woocommerce_get_asset_url
WC_Frontend_Scripts::get_asset_url()
woocommerce_get_asset_url
woocommerce/src/Internal/AddressProvider/AbstractAutomatticAddressProvider.php 265
return apply_filters( 'woocommerce_get_asset_url', plugins_url( $path, Constants::get_constant( 'WC_PLUGIN_FILE' ) ), $path );
woocommerce/includes/class-wc-frontend-scripts.php 118
return apply_filters( 'woocommerce_get_asset_url', plugins_url( $path, WC_PLUGIN_FILE ), $path );

Where the hook is used in WooCommerce

Usage not found.