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:
// show newest product reviews on top
add_filter( 'woocommerce_product_review_list_args', 'newest_reviews_first' );
function newest_reviews_first($args) {
$args['reverse_top_level'] = true;
return $args;
}
Related Posts:
- How to pass/get data to/from the WooCommerce data-product_variations object?
- Filter hook before create order WooCommerce
- How to change Woocommerce breadcrumbs content?
- Add Dropdown menu using “add_filter => wp_nav_menu_items”
- Filter category in WooCommerce shop page to display related sub-category
- How to change currency programmatically on creating order action?
- Redirect to checkout woocommerce failed
- Filter the regular price of woocommerce products
- Adaptive product filters for WooCommerce
- Add default user field to WooCommerce checkout [closed]
- Link to Shop-Filter with .current-menu-item
- Adding a Clone link to product attributes – post_row_actions() filter, or how to override a Class question
- Woocommerce “added to cart” message on main(home) page
- Replacing a deprecated filter ‘woocommerce_get_price’ with ‘woocommerce_product_get_price’
- Woocomemrce order and registration fileds to UPPERCASE
- Sorting products by price ( regular + sale price )
- Redirect to woocommerce checkout after adding to cart – item already in cart
- WooCommerce coupon hook argument NULL when using filter woocommerce_get_shop_coupon_data
- How to access page variable inside action hook
- Put data in my-account/view-order/id/ page
- Modify WooCommerce email shipping text value
- WooCommerce comments_template Filter Not Firing
- Woocommerce: Only one review per verified buyer [closed]
- How to add defer=”defer” tag in plugin javascripts?
- How do filters and hooks really work in PHP
- Trouble understanding apply_filters()
- How would one modify the filtering Gutenberg applies to pasted content?
- Gutenberg: Is there a way to know if current block is inside InnerBlocks?
- How to reorder billing fields in WooCommerce Checkout template? [closed]
- WordPress Internal @ Mentions
- Is it possible to use object in add_action?
- Add Class to Specific Paragraph of the_content()
- WP Rest API – Upload media without saving attachment post
- Using variable from one filter in another filter
- What effect does the_content filter have on performance?
- add class to term_description
- How may I filter get_users() similarly to pre_get_posts?
- How to apply content filter permanently?
- remove other tabs in new wordpress media gallery
- How can I register a new REST context?
- How can I add a fifth option to the alignment picker?
- How to stop WordPress from changing ellipsis into a pre-composed triple-dot glyph?
- Allow EPS file upload – two EPS files have different MIME types
- How to call a function or method that is Namespaced using another plugin
- Applying custom filter instead of the_content doesn’t render embeds
- Change username before login
- apply_filters(‘the_content’) – make it ignore shortcodes?
- Replace a word with a word in the URL string
- Remove Actions added by SEO ultimate Plugin
- Modifying a CoBlocks Filter in Functions
- Shortcodes — Using add_action, add_filter in the shortcode
- Remove Content Filter
- views_edit-post filter not working (custom post type)
- Building a request processor for multi-page forms, etc using $_GET requests
- How to know what filter to use and how to use it?
- Replace audio links with jplayer using the_content filter
- Sorting a specific taxonomy by archive date using URL
- Give “Read More” precedence over excerpt() word count
- Adding a filter to comments_template
- How to customize category_description()?
- Add Bootstrap Classes to Recent Posts Widget
- Is it possible to override the default Gallery Settings form?
- Pre filter woocommerce products to remove a certain category of products
- Filtering a list of objects with ‘OR’ on the same field
- Excerpt is being added above the content, but it should be after it
- How to filter bbPress replies (content)?
- Change login CSS
- How to add a filter to the get_body_class function?
- Change user nicename without sanitize
- How to override include_once pointed file using add_filter?
- Register new user, assign custom role then send email
- How can I get the default content of WordPress post?
- How do I hide tinymce within the edit screen of a particular page
- What would cause the gettext filter to not work for a given text domain?
- pre_get_posts to hide everywhere posts from “Archive” category
- Strip $before & $after strings from a page title
- How to remove shortcode(s) from WYSIWYG Page editor for Non Admins
- How do I safely force get_theme_mod() to use a defined get_option(“stylesheet”) value?
- Shortcode / plugin with custom (flexible) output
- Is it better to use a constant or apply_filter?
- add_action with associative array
- Filter orders in Admin area based on logged in user
- Remove image of srcset
- Add option to query string before get_posts() is called on archive.php
- Modify wp headers on specific page
- Set post featured image to author image
- How to make the show as a button?
- Why this remove empty paragraphs from the_content does not works?
- Take filter from multiple functions
- Read More in the actual excerpt
- WP REST API v2. filters doesn’t work
- filter on the_content stopped working when I updated to WP 3.6.1
- Replace Paid Shipping Method With Free Shipping Method WooCommerce [duplicate]
- Is it possible to make get variable out of filter in Class?
- NextGEN Gallery: Adding drop-down menu widget to gallery view without modifying plugin code [closed]
- Replacing text using add_filter
- Add second price option based on payment method at cart item price
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Change password reqts with NO plugin without breaking resetpass link?
- How can I conditionally add the filter option_home?