Skip to content

Instantly share code, notes, and snippets.

@rickslayer
Last active December 17, 2020 22:46
Show Gist options
  • Save rickslayer/e2bd051a41e9bdd94c2d92bca36a0dc2 to your computer and use it in GitHub Desktop.
Save rickslayer/e2bd051a41e9bdd94c2d92bca36a0dc2 to your computer and use it in GitHub Desktop.
Show newest product reviews on top Woocommerce Product page
// MOSTRAR OS REVIEWS DE PRODUTOS NO WOOCOMMERCE DO MAIS NOVO PRO MAIS VELHO
add_filter( 'woocommerce_product_review_list_args', 'newest_reviews_first' );
function newest_reviews_first($args) {
$args['reverse_top_level'] = true;
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment