Hello,
Still they don’t show up on the product page when I’m logged in while using my homebuilt theme. But when I change the theme to the default WP Twenty-Twenty theme, they DO show up.
Have you tried clearing browser cache? By default, a private product should still be visible when logged in as admin. I’ve installed 3 different themes and below are screenshots of how the private product looks like with each theme.
Storefront: https://snipboard.io/4pbeVM.jpg
Twenty Twenty: https://snipboard.io/tK3k0s.jpg
Twenty Twenty-One: https://snipboard.io/Av5uLV.jpg
If clearing cache doesn’t help, I believe the issue is at your theme. Please make sure to create a backup and then remove all the custom codes you’ve added to see if the default functionality comes back.
Hi Maykato,
Thank you for your tips, I tried all that but no success. Your Twenty Twenty screenshot looks exactly like my shop when that is active.
I literally removed all code from my theme except a basic index.php and an empty style.css, but the private products still don’t show up, only public products.
If caching were the problem, that would be the same for all themes I guess? Anyway, clearing the browser cache didn’t solve it either. I’m not using caching plugins at the moment.
So I’m still guessing there must be some specific code in the other themes to allow private products to be displayed.
Thanks again, it’s not a huge problem but quite inconvenient.
Hello @stickypixels!
I understand the issue you are facing is specific to the theme you are using.
To troubleshoot the issue it will require checking the theme you are using, which is beyond the scope of this forum.
I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
For help with custom code we recommend the WooCommerce Developer Resources Portal.
You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.
Lastly, for direct assistance with code customizations, we recommend consulting with the WooCommerce Customizations Partners. https://woocommerce.com/customizations/