| 开发者 | edenworks |
|---|---|
| 更新时间 | 2026年11月5日 11:23 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
No. They stay visible, just at the end. If you want to hide them completely, WooCommerce has a built-in option (WooCommerce → Settings → Products → Inventory → "Hide out of stock items from the catalog").
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.
Yes. Within the in-stock group and within the sold-out group your chosen sorting still applies.
You choose: treated as in stock (default), shown between in-stock and sold-out products, or treated as sold out.
Yes. Cached pages update when your cache refreshes, the same as any stock change.
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 instock_first_applies_to_query filter.
No. The plugin does not collect, store or send any data, and it makes no external requests.
instock_first_applies_to_query (bool $apply, WP_Query $query): turn reordering on or off for any query.instock_first_rank_cases (array $ranks): map stock statuses to sort ranks (lower is earlier).instock_first_rank_sql (string $sql, string $alias, WP_Query $query): replace the rank SQL expression.