Why do WooCommerce related products show the oldest products?
-
Hi,
WooCommerce related products show the first (oldest) products added in the category.
I thought this would improve with this code, but again it brings out the old products, just sorting them in itself;
add_filter( 'woocommerce_output_related_products_args', 'change_related_products', 20, 1 ); function change_related_products( $args ) { $args = wp_parse_args( array( 'posts_per_page' => 12, 'columns' => 12, 'orderby' => 'date', 'order' => 'desc' ), $args ); return $args; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Why do WooCommerce related products show the oldest products?’ is closed to new replies.