WooCommerce Out Of Stock Last

설명

This plugin helps the user to find the available products more easily.

List the products that are not in stock at the end, in this way the user first sees the products in stock, and the products that are not in stock do not lose their ranking in the search engines index.

설치

Install and activate.

후기

2022년 11월 10일
This is a very poor implementation of sorting out of stock products last. Firstly, the code was blatantly stolen from Business Bloomer without giving credit. More importantly, it doesn't just sort out of stock products last, it completely overrides the sorting of your products, so that selecting "Latest", "Best Sellers", etc. no longer works. And it doesn't even do that right. It sorts in stock products first, then products on backorder, and then out of stock products. This was also brought to the author's attention many months ago by @fightingbettas in a support topic, which went completely ignored. If you want to do this properly, use something like this: add_filter('posts_orderby', function($orderby, $query) { global $wpdb; static $oos_sql; if ($query->is_singular || !$query->is_main_query() || $query->get('wc_query') !== 'product_query' || is_admin()) { return $orderby; } if ($oos_sql === null) { $oos_term = get_term_by('name', 'outofstock', 'product_visibility'); $oos_sql = "{$wpdb->posts}.ID IN (SELECT object_id FROM {$wpdb->term_relationships} WHERE term_taxonomy_id = {$oos_term->term_taxonomy_id}) ASC"; } $orderby = $oos_sql . ', ' . $orderby; return $orderby; }, 10, 2);
2022년 5월 16일
This plug-in fixes a problem that WooCommerce has long overlooked: simply moving out of stock products to the end of store instead of hiding them completely (the only available Product settings option). There are numerous workarounds involving editing the functions.php file, but this solution is easier to employ. Works fine in WordPress 5.9.3 on my client's Avada site.
모든 5 평가 읽기

기여자 & 개발자

“WooCommerce Out Of Stock Last”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “WooCommerce Out Of Stock Last”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.