I want to hide out of stock items in the related products section on the product page, but I don't want to hide them comletely from the eshop. I want people to see them in shop or search, but not in the related products section inside the product page.
Hi Ylli, I think that Arlind has some kind of a solution for this, because he advised me ten minutes ago to open a new ticket (we were talking in an old ticket) so that others can see the solution on this.
Anyway, I know this is possible in woocommerce, 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
It's not a customization question actually. I'm not asking you how to make this customization. I using a universal woocommerce hook that should work, but it doesn't work on your theme.
That's why I ask you guys if there is a conflict. I can't search all your theme code to find it myself.
Please don't post the same reply or let Arlind check this topic out because we were talking with him previously and he knows the case
Arlind, thanks for the reply. You gave me the same code in the previous topic I created as dimissel (dichagr after I changed my username). As I said there, it's working for the laborator shortcodes but it doesn't work for the out of stock products inside the product page in the related section.
If you have any idea why both your code and my code don't work, I would appreciate it.
Hello,
I want to hide out of stock items in the related products section on the product page, but I don't want to hide them comletely from the eshop. I want people to see them in shop or search, but not in the related products section inside the product page.
Could you please provide a solution for this?
Thanks
Hi dichagr,
I think that this is not possible in WooCommerce plugin but please contact WooCommerce support any maybe they can head you to the right direction.
Thanks!
Hi Ylli, I think that Arlind has some kind of a solution for this, because he advised me ten minutes ago to open a new ticket (we were talking in an old ticket) so that others can see the solution on this.
Anyway, I know this is possible in woocommerce, 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.
My filter generally works, but it doesn't on your theme, that's why I opened this ticket so you can help me out in some way.
Thanks again
Hi dichagr,
I'm sorry but this is a customization question and support doesn't offer customization services as we wrote on our support homepage and on this area.
Would like to thank you for your understanding!
It's not a customization question actually. I'm not asking you how to make this customization. I using a universal woocommerce hook that should work, but it doesn't work on your theme.
That's why I ask you guys if there is a conflict. I can't search all your theme code to find it myself.
Please don't post the same reply or let Arlind check this topic out because we were talking with him previously and he knows the case
Hi dichagr,
Ok then, I will forward this ticket to Arlind so he will continue the conversation that you started.
Thanks for your understanding!
Hi dichagr,
I have created a code snippet for you to hide out of stock products:
Please add the above code in functions.phpThis should work for you.
Arlind, thanks for the reply. You gave me the same code in the previous topic I created as dimissel (dichagr after I changed my username). As I said there, it's working for the laborator shortcodes but it doesn't work for the out of stock products inside the product page in the related section.
If you have any idea why both your code and my code don't work, I would appreciate it.
Hi dichagr,
Please add this code in addition to the previous one:
This should do the trick.Out of stock products are still appearing, and it also really messes up with my CSS.
Anyway, I guess there is no way to hide them, I give up. Thanks for the help, I really appreciate it
Ok then.
Will mark this ticket as solved from here.