woocommerce_product_add_to_cart_url filter-hookWC 1.0

Get the add to url used mainly in loops.

Usage

add_filter( 'woocommerce_product_add_to_cart_url', 'wp_kama_woocommerce_product_add_to_cart_url_filter', 10, 2 );

/**
 * Function for `woocommerce_product_add_to_cart_url` filter-hook.
 * 
 * @param  $product_url 
 * @param  $that        
 *
 * @return 
 */
function wp_kama_woocommerce_product_add_to_cart_url_filter( $product_url, $that ){

	// filter...
	return $product_url;
}
$product_url
-
$that
-

Where the hook is called

WC_Product_External::add_to_cart_url()
woocommerce_product_add_to_cart_url
WC_Product_Simple::add_to_cart_url()
woocommerce_product_add_to_cart_url
WC_Product_Variation::add_to_cart_url()
woocommerce_product_add_to_cart_url
WC_Product::add_to_cart_url()
woocommerce_product_add_to_cart_url
woocommerce/includes/class-wc-product-external.php 161
return apply_filters( 'woocommerce_product_add_to_cart_url', $this->get_product_url(), $this );
woocommerce/includes/class-wc-product-simple.php 51
return apply_filters( 'woocommerce_product_add_to_cart_url', $url, $this );
woocommerce/includes/class-wc-product-variation.php 203
return apply_filters( 'woocommerce_product_add_to_cart_url', $url, $this );
woocommerce/includes/abstracts/abstract-wc-product.php 1915
return apply_filters( 'woocommerce_product_add_to_cart_url', $this->get_permalink(), $this );

Where the hook is used in WooCommerce

Usage not found.