WoodMartW
WoodMart
Jan 21

Show Out of stock products at the end

Please enable the option to display Out of stock products at the end of the product archive.
CompletedCompleted

Aug 19, 2024

Released in update 7.6

Jun 4, 2024

Exciting news for us ❤️❤️💥💥💥

Apr 25, 2024

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 );

Mar 12, 2024

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!

Mar 11, 2024

I've got a code from the Support team, to do that. Is manual, but it works. CHeck the forum

Feb 24, 2024

DEfinetly something usefull for me as well

Jan 24, 2024

Another amazing tool. Today we need to use plugins or snippets to do that and is not perfect.