[Resolved] WooCommerce Cart in Primary Menu – How to change url from cart to checkout?

Home Forums Support [Resolved] WooCommerce Cart in Primary Menu – How to change url from cart to checkout?

Home Forums Support WooCommerce Cart in Primary Menu – How to change url from cart to checkout?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #558979
    Daniel

    Hi Generatepress team,

    I was wondering if there is any way or custom snippet to change the url that is used for the WooCommerce cart in the primary menu from cart to checkout?

    Note:

    Besides WooCommerce > Checkout change cart’s page to checkout.

    Besides force redirect cart to checkout.

    Thanks again!

    #559278
    Tom
    Lead Developer
    Lead Developer

    WooCommerce has this filter: woocommerce_get_cart_url

    Try this:

    add_filter( 'woocommerce_get_cart_url', 'tu_custom_cart_url' );
    function tu_custom_cart_url() {
        return 'URL TO YOUR CHECKOUT';
    }
    #559339
    Daniel

    Thank you Tom. This works! ๐Ÿ™‚

    #559523
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.