This topic has 4 replies, 2 voices, and was last updated 1 years ago ago by Rose Tyler
Hi.
We are trying to replace the position of the Checkout button to be on top of the View Cart button on the Mini Cart widget.
We have used the famous code with no luck, seems that something is overriding it.
remove_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_button_view_cart', 10 );
remove_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_proceed_to_checkout', 20 );
add_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_proceed_to_checkout', 10 );
add_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_button_view_cart', 20 );
Hello, Hempednyc,
Thank you for reaching out to us with your request.
Please try to use custom CSS code:
.mini-cart-buttons {
display: flex;
flex-direction: column;
}
.et_element .mini-cart-buttons .wc-forward:not(.btn-checkout) {
order: 2;
border-color: #020201 !important;
}
.mini-cart-buttons .button.btn-checkout.wc-forward {
order: 1;
margin-top: 0;
margin-bottom: 5px;
}
Kind Regards,
8theme team
Thanks, we will try that as well.
But we are very curious to know why the above functions doesn’t work for WooCommerce with your theme. Can you explain please?
Hello, Hempednyc,
1/ Please note that we can’t be responsible for your custom code.
2/ Do a search and check an example of coding that work – https://www.8theme.com/search/?bbp_search=woocommerce_widget_shopping_cart_buttons&bbp_forum_id=128990
Kind Regards,
8theme team
You must be logged in to reply to this topic.Log in/Sign up