WordPress at Your Fingertips
function is not described

WC_Product::add_to_cart_url() public WC 1.0

Get the add to url used mainly in loops.

{} It's a method of the class: WC_Product{}

Hooks from the method
Return

String.

Usage

$WC_Product = new WC_Product();
$WC_Product->add_to_cart_url();

Code of WC_Product::add_to_cart_url() WC 5.5.2

<?php
public function add_to_cart_url() {
	return apply_filters( 'woocommerce_product_add_to_cart_url', $this->get_permalink(), $this );
}