Exciting news for us ❤️❤️💥💥💥
Hello! Code for function.php for this: function custom_product_query( $clauses, $query ) { global $wpdb; $clauses['join'] .= " LEFT JOIN {$wpdb->prefix}postmeta out_of_stock_meta ON ({$wpdb->prefix}posts.ID = out_of_stock_meta.post_id AND out_of_stock_meta.meta_key = '_stock_status' AND out_of_stock_meta.meta_value = 'outofstock') "; $clauses['orderby'] = "out_of_stock_meta.meta_value ASC, {$clauses['orderby']}"; return $clauses; } add_filter( 'posts_clauses', 'custom_product_query', 10, 2 );
Exactly I need this feature. I think that a lot of Woodmart users need this feature, but they don't know it! If they knew the effect of this on the sale of their site, it would not be possible for this post to have so many votes!
I've got a code from the Support team, to do that. Is manual, but it works. CHeck the forum
DEfinetly something usefull for me as well
Another amazing tool. Today we need to use plugins or snippets to do that and is not perfect.
Released in update 7.6