• Hi,

    I’d like customers to go to my custom page before the checkout. Therefore I’ve changed the checkout url to my page, which then re-directs to the checkout once the form there is complete.

    I’m using the following to filter the custom url anywhere but the checkout.

    function jmfe_redirect_checkout($url) {
        global $woocommerce;
            if( ! is_checkout()){
                $checkout_url = 'http://localhost:28/camplight.dev/checkout';
            }
        return $checkout_url;
    }
    add_filter('woocommerce_get_checkout_url', 'jmfe_redirect_checkout');

    This works for all links to the checkout other than the header cart. As far as I can see throughout the core code of the theme and the WooCommerce plugin – the code used is in the mini-cart.php file as the header cart (as far as I can see) is calling an instance of the cart widget.

    Therefore, I imported the mini-cart.php file into my theme as per usual when overriding WooCommerce template files. I changed the link to the checkout to my custom page, but the changes weren’t in the site.

    I also, just to test changed the link in the actual plug file, but the changes were still not reflected in my theme.

    Am I missing something about the way the header cart is called?

  • The topic ‘WooThemes Storefront – Change header cart checkout link’ is closed to new replies.