astra_woocommerce_get_cart_url( string|null $cart_url = null )
Filters and returns the WooCommerce cart URL for compatibility with WooCommerce 9.3.0.
Description
Parameters
- $cart_url
-
(string|null) (Optional) WooCommerce cart page URL.
Default value: null
Return
(string) Returns the filtered WooCommerce cart page URL.
Source
File: inc/compatibility/woocommerce/woocommerce-common-functions.php
function astra_woocommerce_get_cart_url( $cart_url ) {
// Check if WooCommerce function exists.
if ( function_exists( 'wc_get_page_permalink' ) ) {
$cart_url = wc_get_page_permalink( 'cart' );
}
return $cart_url;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 4.8.3 | Introduced. |