{"id":391734,"date":"2026-11-05T03:24:02","date_gmt":"2026-11-05T03:24:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/instock-first-sold-out-products-last-for-woocommerce\/"},"modified":"2026-11-05T03:23:36","modified_gmt":"2026-11-05T03:23:36","slug":"instock-first","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/instock-first\/","author":23591518,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.4","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"InStock First \u2013 Sold Out Products Last for WooCommerce","header_author":"Eden Works","header_description":"Shows in-stock products first and moves sold-out products to the end of your shop, category, tag, search and [products] shortcode listings. Restocked products move back up automatically.","assets_banners_color":"99c7c3","last_updated":"2026-11-05 03:23:36","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/instock-first\/","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":69,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"edenworks","date":"2026-11-05 03:23:36","revision":3785147}},"upgrade_notice":{"1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3785146,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3785146,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3785146,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3785146,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3785146,"resolution":"1","location":"assets","locale":"","width":1600,"height":999},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3785146,"resolution":"2","location":"assets","locale":"","width":1280,"height":758},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3785146,"resolution":"3","location":"assets","locale":"","width":1240,"height":1530}},"screenshots":{"1":"A category page before and after: sold-out products move to the end.","2":"Settings: WooCommerce \u2192 Settings \u2192 Products \u2192 Sold-out order.","3":"Your normal sorting (here \"price: low to high\") is kept inside the in-stock and sold-out groups."}},"plugin_section":[],"plugin_tags":[4423,37973,65620,178469,286],"plugin_category":[45],"plugin_contributors":[290823],"plugin_business_model":[],"class_list":["post-391734","plugin","type-plugin","status-publish","hentry","plugin_tags-out-of-stock","plugin_tags-product-sorting","plugin_tags-sold-out","plugin_tags-stock-status","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-edenworks","plugin_committers-edenworks"],"banners":{"banner":"https:\/\/ps.w.org\/instock-first\/assets\/banner-772x250.png?rev=3785146","banner_2x":"https:\/\/ps.w.org\/instock-first\/assets\/banner-1544x500.png?rev=3785146","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/instock-first\/assets\/icon-128x128.png?rev=3785146","icon_2x":"https:\/\/ps.w.org\/instock-first\/assets\/icon-256x256.png?rev=3785146","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/instock-first\/assets\/screenshot-1.png?rev=3785146","caption":"A category page before and after: sold-out products move to the end."},{"src":"https:\/\/ps.w.org\/instock-first\/assets\/screenshot-2.png?rev=3785146","caption":"Settings: WooCommerce \u2192 Settings \u2192 Products \u2192 Sold-out order."},{"src":"https:\/\/ps.w.org\/instock-first\/assets\/screenshot-3.png?rev=3785146","caption":"Your normal sorting (here \"price: low to high\") is kept inside the in-stock and sold-out groups."}],"raw_content":"<!--section=description-->\n<p>Shoppers who land on a category full of \"Out of stock\" badges leave. <strong>InStock First<\/strong> keeps what you can actually sell at the top: in-stock products are shown first and sold-out products move to the end of the list, without hiding them (so you keep their SEO and customers can still sign up for restock alerts).<\/p>\n\n<p>It works the moment you activate it. There is nothing to configure and nothing to re-run: the order is applied when the page loads, so a product that comes back in stock moves straight back up, and a product that sells out drops to the end on its own.<\/p>\n\n<h4>What it does (free, no limits)<\/h4>\n\n<ul>\n<li><strong>Out of stock products last<\/strong> on the main shop page<\/li>\n<li><strong>Category, tag and attribute archives<\/strong> (every product taxonomy)<\/li>\n<li><strong>Product search results<\/strong><\/li>\n<li><strong>[products] shortcode<\/strong> lists<\/li>\n<li><strong>Keeps your normal sorting<\/strong> inside each group: default\/custom order, popularity, rating, newest, price low to high and high to low all still work<\/li>\n<li><strong>Backorders your way<\/strong>: treat them as in stock, put them between in-stock and sold-out, or treat them as sold out<\/li>\n<li><strong>Variable products<\/strong> are handled through WooCommerce's own stock status (a variable product is \"out of stock\" only when all its variations are)<\/li>\n<li><strong>No catalog changes<\/strong>: it never edits products, menu order or dates, so deactivating it puts everything back exactly as it was<\/li>\n<li><strong>Fast<\/strong>: one indexed join on WooCommerce's product lookup table, no extra queries per product, no cron jobs, no background processing<\/li>\n<li>Works with any theme that uses standard WooCommerce product loops<\/li>\n<li>HPOS compatible, translation ready, no ads, no tracking<\/li>\n<\/ul>\n\n<h3>Privacy<\/h3>\n\n<p>InStock First does not collect, store or send personal data, and it makes no external requests.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate WooCommerce.<\/li>\n<li>Go to Plugins \u2192 Add New, search for \"InStock First\", install and activate.<\/li>\n<li>That's it. Sold-out products now appear last. Optional settings: WooCommerce \u2192 Settings \u2192 Products \u2192 Sold-out order.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20hide%20out%20of%20stock%20products%3F\"><h3>Does this hide out of stock products?<\/h3><\/dt>\n<dd><p>No. They stay visible, just at the end. If you want to hide them completely, WooCommerce has a built-in option (WooCommerce \u2192 Settings \u2192 Products \u2192 Inventory \u2192 \"Hide out of stock items from the catalog\").<\/p><\/dd>\n<dt id=\"will%20it%20change%20my%20product%20order%20or%20data%3F\"><h3>Will it change my product order or data?<\/h3><\/dt>\n<dd><p>No. Nothing is written to your products. The order is calculated when the listing is shown, so deactivating the plugin restores your previous order instantly.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20sorting%20by%20price%2C%20popularity%20or%20newest%3F\"><h3>Does it work with sorting by price, popularity or newest?<\/h3><\/dt>\n<dd><p>Yes. Within the in-stock group and within the sold-out group your chosen sorting still applies.<\/p><\/dd>\n<dt id=\"what%20about%20products%20on%20backorder%3F\"><h3>What about products on backorder?<\/h3><\/dt>\n<dd><p>You choose: treated as in stock (default), shown between in-stock and sold-out products, or treated as sold out.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20caching%20plugins%3F\"><h3>Does it work with caching plugins?<\/h3><\/dt>\n<dd><p>Yes. Cached pages update when your cache refreshes, the same as any stock change.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20the%20block%20editor%20%22product%20collection%22%20block%20or%20page%20builders%3F\"><h3>Does it work with the block editor \"Product Collection\" block or page builders?<\/h3><\/dt>\n<dd><p>Version 1.0 covers the classic shop, category, tag, attribute and search pages (including block themes' product archive templates that use the main query) and the [products] shortcode. Custom loops can opt in with the <code>instock_first_applies_to_query<\/code> filter.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20collect%20any%20data%3F\"><h3>Does the plugin collect any data?<\/h3><\/dt>\n<dd><p>No. The plugin does not collect, store or send any data, and it makes no external requests.<\/p><\/dd>\n<dt id=\"developer%20hooks\"><h3>Developer hooks<\/h3><\/dt>\n<dd><ul>\n<li><code>instock_first_applies_to_query<\/code> (bool $apply, WP_Query $query): turn reordering on or off for any query.<\/li>\n<li><code>instock_first_rank_cases<\/code> (array $ranks): map stock statuses to sort ranks (lower is earlier).<\/li>\n<li><code>instock_first_rank_sql<\/code> (string $sql, string $alias, WP_Query $query): replace the rank SQL expression.<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Show in-stock products first. Move out of stock (sold out) products to the end of your WooCommerce shop, category and search pages automatically.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/391734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=391734"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/edenworks"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=391734"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=391734"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=391734"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=391734"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=391734"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=391734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}