One my client want to display all woocommerce product by product SKU
.
Normally i used following code for display products.
$postArg = array('post_type'=>'product',
'post_status'=>'publish',
'posts_per_page'=>-1,
'orderby'=>'data',
'order'=>'DESC',
);
$queryGetFiles = get_posts($postArg);
But now my client want to show all products by product SKU
in front side.
SKU like this 1041-14, 1041-12, 1041-16 ,1041,2001,3501
all product has different sku value and display which doesn't have "-"
character
Anyone know how should i do this?