WooCommerce questions are off-topic, but since reviews are merely comments, I think we can make the case that ordering comments is still on-topic.
wp_list_comments()
has a reverse_top_level
parameter that will set the most recent comment first and then go backwards. Assuming it works like I think it should then you’d want to add this parameter to WooCommerce’s wp_list_comments()
.
Conveniently, a filter is available for the wp_list_comments()
args that are used in the single-product-reviews.php
template.
<ol class="commentlist">
<?php wp_list_comments( apply_filters( 'woocommerce_product_review_list_args', array( 'callback' => 'woocommerce_comments' ) ) ); ?>
</ol>
So, then to filter in new args, the process of filtering is the same as usual:
function wpa_filter_list_comments($args){
$args['reverse_top_level'] = true;
return $args;
}
add_filter( 'woocommerce_product_review_list_args', 'wpa_filter_list_comments' );
Related Posts:
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- Plugin Repository commit doesn’t show up in activity
- how to do login using woocommerce rest api From android
- Custom Pages for Woocommerce Product-Category Pages
- Woocommerce Minimum Price for a Composite Product to add in cart
- creating a custom shop page display on archive woocommerce
- Woocommerce Shop page variation product button replace with add to cart button
- How can I insert thousands of Woocommerce products by batch with PHP? [closed]
- WooCommerce search products between price range using WP_Query
- How to use get_template part in the plugin?
- Redirect to another page using contact form 7? [closed]
- How to use add_submenu_page() for editors?
- PHP Error When a plugin is active
- woocommerce with custom post type
- Show author on every sub-page
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- URLs Added to ACF Repeater Field are not working
- Exact Hook to payment methods
- Restrict content based on buy woocommerce product
- How to get a list of bundled products using wp_query in woocommerce
- Adding Static Image to WooCommerce Content-Single-Product template
- Hide a Menu Item on Login
- Create custom template in plugin and display it into post template section?
- Product count in archive page Title in WooCommerce [closed]
- Add item to the woocommerce dashboard menu from a plugin
- WooCommerce – set session with new cart item meta when updating cart item quantity [closed]
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- How to get the particular product quantity in orders in Woocommerce [closed]
- Get Every Key & Value from Array then Display All in New Line
- Woocommerce Coupon Menu and Marketing Menu missing After “Coupons can now be managed from Marketing > Coupons.” [closed]
- Get orders of a specific customer woocommerce
- WooCommerce: Force coupon for existing/registered customers [closed]
- Add_rewrite_endpoint doesn’t work with post name permalink structure
- wc_get_template new template does not showing up
- Show icons or badges under title on product archives/category pages
- Conditional Shipping Options if Certain Products are in Cart WooCommerce
- WordPress Stock Update Programatically
- Woocommerce Backend Search by Title and SKU
- Problem with add_action
- the_content() printing DOCTYPE, and tags in the middle of page
- WooCommerce Shopping Cart Not Initially Showing Products [closed]
- How can I concatenate variables to search results title? [closed]
- WooCommerce: after install hook
- How to add a new column with text fields to WooCommerce Cart List?
- Add a “View all” button on WooCommerce product archives pages
- I am trying to make a field show and save from quickedit screen
- Woocommerce: limit user to see only the products he created
- Woocommerce singe product custom gallery output works just on the first slide
- How to include a custom field in the woocommerce email?
- woocommerce search by sku and title ajax
- Woocomerce add info after order email prouct item
- Remove Pagination for Product Category Pages WooCommerce
- add seperate suffix for low price and high price in woocommerce
- Get products list by url key in WordPress Woocommerce [closed]
- Cross Sells are not being shown in Cart Page. Please Help!
- How to display registered customer list as dropdown in WooCommerce checkout?
- How do I create a custom permalink structure for a page template
- How do I get the Payzone WooCommerce payment gateway plugin to show up in the settings? [closed]
- Error with get_price (and others) in self-written plugin to show price
- How to change WooCommece variation data programmtically [closed]
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- .php file for woocommerce edit category? [closed]
- Woocommerce – WordPress Roles & Capabilities
- Advanced Custom Fields (acf) – Filter Relationship by Taxonomies not Post Type
- Sending customer an email with link to stripe to make payment
- Override a Plugin Function
- Custom template for all woo commerce categories
- How to remove products-links after the product title using remove_action
- Search users with custom meta data
- WordPress Multi-Step Product Search
- Is it possible to instantiate a new WC_Cart?
- Woocommerce Free shipping method [closed]
- how get curent URL slug from archive page [closed]
- dynamically create callback functions inside a for loop
- Sell access to form [closed]
- get_term_meta returns false in widget
- Add key and value to an array in another file
- Custom search search does not work?
- WordPress custom plugin that uses woocommerce enabled payment gateway for payment [closed]
- Plugin create pages and use templates
- Disable variations on woo commerce if out of stock
- How to change layout of shop page in wordpress? [closed]
- I want to filter my products with attributes [closed]
- How to add category and subcategory in WordPress custom code?
- Customizing $product->get_title() function
- Custom form not showing in correct place on page
- Ajax Call in page theme not working?
- How do I show content from a plugin using the template the site is currently working with?
- Woocommerce – Change Variable Product Add to Cart to behave like external product using Custom Field (link) [closed]
- How can recognize post’s category?
- How to dynamically change spots of text in custom page?
- Make 2 different WooCommerce checkout pages?
- Pull comments from one page/post into another page/post?
- Add custom PHP and HTML to the_content()
- How to modify the Loop from a plugin (instead of a theme)
- How to return a specific attribute
- Automatic recurring payment using YITH subscription and Dokan Stripe
- Woocommerce checkout page broken when set as a checkout in woocommerce settings [closed]
- How to get custom minimum price in Woocommerce
- apply_filters(woocommerce_get_item_data, …) Causing errors when adding to cart