woocommerce_get_cart_url
Filter the cart URL.
Usage
add_filter( 'woocommerce_get_cart_url', 'wp_kama_woocommerce_get_cart_url_filter' ); /** * Function for `woocommerce_get_cart_url` filter-hook. * * @param string $cart_url Cart URL. * * @return string */ function wp_kama_woocommerce_get_cart_url_filter( $cart_url ){ // filter... return $cart_url; }
- $cart_url(string)
- Cart URL.
Changelog
Since 2.5.0 | Introduced. |
Where the hook is called
woocommerce_get_cart_url
woocommerce/includes/wc-core-functions.php 1501
return apply_filters( 'woocommerce_get_cart_url', $cart_url );