change the order of items in the mini-cart of your Woodmart theme to have the la
-
To change the order of items in the mini-cart of your Woodmart theme to have the last added item appear first, you would need to customize the code that handles the cart items listing. However, based on the search results provided, there is no direct solution to this specific request available.
Hello,
Sorry to say but right now there is no option in Theme Settings available for that. It requires Customization and this is beyond our limitations and support policy scope. Hope you can understand our limitations.
If you’d like to contact us, we are here for whatever questions you may have.
Kind Regards.
Hello, can you do it with custom development?
Hello,
Try to define the below code in the child theme and recheck the issue.
if ( ! function_exists('wd_revers_cart_content')) {
function wd_revers_cart_content( $cart_contents ) {
if ( $cart_contents && is_array( $cart_contents ) ) {
$cart_contents = array_reverse( $cart_contents );
}
return $cart_contents;
}
add_action('woocommerce_before_mini_cart_contents', function () {
add_action('woocommerce_get_cart_contents', 'wd_revers_cart_content');
});
add_action('woocommerce_after_mini_cart', function () {
remove_action('woocommerce_get_cart_contents', 'wd_revers_cart_content');
});
}
In the meantime, feel free to ask me any questions you may have.
Kind Regards
Hello,
You are welcome! In case you need any additional help, I’d be more than happy to assist you.
Have a good day!
Kind Regards
The topic ‘change the order of items in the mini-cart of your Woodmart theme to have the la’ is closed to new replies.