By default, woocommerce product reviews are listed in chronological order. How do you get the newest review to appear first?
1 comment
Comments are closed.
By default, woocommerce product reviews are listed in chronological order. How do you get the newest review to appear first?
Comments are closed.
I couldn’t find this documented anywhere, but the solution is pretty simple.
In
single_product_review.php
, the arguments passed to wp_list_comments are filtered:wp_list_comments( apply_filters( 'woocommerce_product_review_list_args', array( 'callback' => 'woocommerce_comments' ) ) );
by adding
reverse_top_level
to the arguments, the order is reversed.Add the following code to your theme’s functions.php: