wc_get_cart_url
Gets the url to the cart page.
Description
(string) wc_get_cart_url();
Returns (string)
Url to cart page
Usage
if ( !function_exists( 'wc_get_cart_url' ) ) { require_once '/includes/wc-core-functions.php'; } // NOTICE! Understand what this does before running. $result = wc_get_cart_url();
Defined (1)
The function is defined in the following location(s).
- /includes/wc-core-functions.php
- function wc_get_cart_url() {
- return apply_filters( 'woocommerce_get_cart_url', wc_get_page_permalink( 'cart' ) );
- }