Redirect to custom URL after user clicks 'Proceed to checkout' at the cart page (wordpress)
问题 When user clicks 'Proceed to checkout' at the cart page, I would like to send him to custom URL. I used this filter in functions.php add_filter('woocommerce_get_checkout_url', 'dj_redirect_checkout'); function dj_redirect_checkout($url) { global $woocommerce; $checkout_url = 'http://my-custom-url.com'; return $checkout_url; } However, in this case this filter is triggered on the checkout page as well and I would like to trigger it on the Cart page and after the click 'Proceed to checkout'