Site logo

[Resolved] Woocommerce Mini Cart Change Link

Home Forums Support [Resolved] Woocommerce Mini Cart Change Link

Home Forums Support Woocommerce Mini Cart Change Link

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1937689
    Jonathan

    Hello,

    Instead of the mini cart link going to the basket I’d like it to go straight to the checkout page. We’ve one simple product and so we redirect the shop page straight to the cart page missing out the basket altogether.

    regards,

    Jonathan

    #1937826
    David
    Staff
    Customer Support

    Hi there,

    by default the mini cart should show Cart and Checkout links.
    Do you simply want to remove the Cart link ?

    #1937832
    Jonathan

    If I can’t replace it, yes?

    #1938097
    David
    Staff
    Customer Support

    You can add this PHP Snippet to remove the Cart Button:

    remove_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_button_view_cart', 10 );

    NOTE: You will need to clear the cart transients cache ( simple way is to add / remove ) something from the cart to see it update.

    Then a little CSS to make the Checkout button fill the width:

    .woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a {
        width: 100%;
    }
    #1939036
    Jonathan

    Thanks

    #1939048
    David
    Staff
    Customer Support

    You’re welcome

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