I agree that related products are not so related, except if you have any filter above the woocommerce filter to output related products in theme as we tried to edit them by code but we didn't succeed that as it seems not to override them.
Also, the other two things I ask you are surely related to your theme as I ask you how to hide out of stock product from your shortcodes in Composer (shortcodes Products Carousel and Products).
I have already tried the code you suggested but it's not optimal as it leaves a blank spot where the out of stock product was. As a result, in some cases there are 1 or zero related products showing. I am using the 'woocommerce_output_related_products_args' hook to filter them out but it's not working as it should. It seems like aurum overrides this with its own filter which is possible because I see an option at
Regarding your question, kindly open a new ticket and post your request so it will be helpful for the other users to take advantage of searching them on the forum. We’re glad to help you in your new thread.
Hello gus.
Can we somehow hide the out of stock products in Related products, in Products Carousel and in Products (your shortcodes in Visual Composer)?
We don;t want to hide them generally from the eshop, just from these options.
Thanks in advance
Hi there,
Add this CSS to Custom CSS:
And the out of stock badge will be hidden from the related products only.
Best regards,
Laborator Team
Art,
we want to hide the products. To filter them out. To not load them but to load some that are in stock.
Can we do this?
Sorry I misunderstood you, I found this article which can help you further as it is not something related to the theme.
Best regards,
Laborator Team
Thanks for your answer.
I agree that related products are not so related, except if you have any filter above the woocommerce filter to output related products in theme as we tried to edit them by code but we didn't succeed that as it seems not to override them.
Also, the other two things I ask you are surely related to your theme as I ask you how to hide out of stock product from your shortcodes in Composer (shortcodes Products Carousel and Products).
Related products:
I have already tried the code you suggested but it's not optimal as it leaves a blank spot where the out of stock product was. As a result, in some cases there are 1 or zero related products showing. I am using the 'woocommerce_output_related_products_args' hook to filter them out but it's not working as it should. It seems like aurum overrides this with its own filter which is possible because I see an option at
laborator > theme options > shop settings > Related products count: 4
that may use this particular hook or something similar and overrides mine.
Laborator shortcodes:
My question still applies. How to hide out of stock items from Products Carousel & Products (WPbakery laborator blocks)
Hi dichagr,
Can you please add the following code in functions.php (end of file):
This will do the trick.
Nice piece of code! This worked for your shortcode queries! Thank you very much
I can still see out-of-stock items in related products section on the product page though. Can you provide a solution for this too?
Hi dichagr,
This ticket is created by another user.
Regarding your question, kindly open a new ticket and post your request so it will be helpful for the other users to take advantage of searching them on the forum. We’re glad to help you in your new thread.
Will set this ticket as solved from here.