Order by sku
-
Hi There,
I tried the code to order on sku
add_filter( 'aws_search_results_products', 'aws_search_results_products' ); function aws_search_results_products( $products ) { usort($products, function ($item1, $item2) { $a = $item1['sku']; $b = $item2['sku']; if ($a == $b) { return 0; } return ($a < $b) ? 1 : -1; }); return $products; }It is not working. Please check how to fix.
Thankyou!
Adrider
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Order by sku’ is closed to new replies.