Hello,
By default, WooCommerce does not have a separate option to hide out-of-stock products only from related/similar products, cross-sells, or upsells while keeping them visible in the catalog.
The option “Hide out of stock items from the catalog” works globally for the entire shop.
If you want to keep out-of-stock products visible in the shop/archive pages but exclude them only from related products sections, it is possible using the WoodMart Single Product Layout Builder.
Since you want to keep out-of-stock products visible in the shop/archive pages but hide them only from the “Similar Products”/related products section, you can achieve this by using the Products Grid or Products Carousel element in the Single Product Layout.
Please check the following:
1. Navigate to Layouts > Single Product Layout
2. Edit the layout you are currently using
3. Open the Products Grid or Products Carousel element used for related products
4. Set the Data Source to Related Products
5. Enable the option:
“Hide out of stock products”
See Screenshot for better understanding: https://postimg.cc/CBP4WxY2
This will exclude out-of-stock items only from the related products section while still keeping them visible in your catalog and product pages.
Best Regards