Hi, 8theme.
How sorting items in Mini-cart type right menu from Z-A (reverse_cart_contents)? Use this code but after have issues with add quantity input products.
revers items in cart and mini cart
function reverse_cart_contents() {
$cart_contents = WC()->cart->get_cart_contents();
if($cart_contents) {
$reversed_contents = array_reverse($cart_contents);
WC()->cart->set_cart_contents($reversed_contents);
}
}
add_action('woocommerce_before_mini_cart', 'reverse_cart_contents');
add_action('woocommerce_after_mini_cart', 'reverse_cart_contents');
add_action('woocommerce_before_cart', 'reverse_cart_contents');
add_action('woocommerce_after_cart', 'reverse_cart_contents');
add_action('woocommerce_review_order_before_cart_contents', 'reverse_cart_contents');
add_action('woocommerce_review_order_after_cart_contents', 'reverse_cart_contents');
Thanks
Best, Paul
Site URL: hidden Theme version: 4.2 WooCommerce version: 6.6.0Hello,
Try this solutions https://www.8theme.com/topic/showing-latest-product-at-the-top-of-the-side-cart-rather-than-bottom/
Regards
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.