wc_get_cart_remove_url()WC 3.3.0

Gets the url to remove an item from the cart.

Хуки из функции

Возвращает

Строку. url to page

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

wc_get_cart_remove_url( $cart_item_key );
$cart_item_key(строка) (обязательный)
contains the id of the cart item.

Список изменений

С версии 3.3.0 Введена.

Код wc_get_cart_remove_url() WC 8.7.0

function wc_get_cart_remove_url( $cart_item_key ) {
	$cart_page_url = wc_get_cart_url();
	return apply_filters( 'woocommerce_get_remove_url', $cart_page_url ? wp_nonce_url( add_query_arg( 'remove_item', $cart_item_key, $cart_page_url ), 'woocommerce-cart' ) : '' );
}