Archived topic
WC Mini Cart - Hide Cart Button
3 replies · Started by pairfum on December 4, 2020
Dear Support @ GeneratePress,
We are working on combining the Cart & Checkout pages on a single page, using this guide:
https://www.businessbloomer.com/woocommerce-cart-checkout-same-page/
You can see the result on our staging site:
https://staging.pairfum.com
In this context, we would like to hide the 'view basket' button within GP's WC Mini Cart drop down panel.
When we use this CSS snippet, it hides both the 'view basket' and 'checkout' buttons:
a.button.wc-forward {
display: none;
}
Would you be able to provide us with a suitable code snippet?
Many thanks for your help.
Kind regards,
Pairfum London
Hi there,
try this CSS:
.menu-bar-items .widget_shopping_cart .woocommerce-mini-cart__buttons .wc-forward:not(.checkout) {
display: none;
}
.menu-bar-items .widget_shopping_cart .woocommerce-mini-cart__buttons .wc-forward.checkout {
flex: 1;
}
Hi David,
The CSS code works and you can see it here:
https://staging.pairfum.com
The only thing we noticed is that when the menu switches to the stick mobile menu, that when you click on the basket item, the URL directs to the cart rather than the checkout page.
Is it possible to adjust this behaviour, i.e. direct to checkout rather than cart?
Many thanks for your help with this.
Kind regards,
Pairfum London
Any chance you can open a new topic for the separate question if the original issue is resolved on hide the cart button is resolved?
Thanks :)