简体   繁体   中英

woocommerce - display variations in stock

I have enabled the attributes widgets on the shop page. My products use two attributes: style and size. Let's say a customer selects style as boys and size as large. All the products with the variation boys large show up.

But many of these variations are out of stock. How can I restrict the display to show only products with that variation that is in stock?

example: display products with the variation (boys large) in stock and hide products with the variation (boys large) out of stock.

From the dashboard:

  • Go to the WooCommerce -> Settings
  • In the settings go to the Products tab and then Inventory sub-tab
  • About 3/4 way down the page there is an option called "Out Of Stock Visibility", tick it
  • Save the changes and the if the variation is out of stock it should no longer appear as an option.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM