• Resolved StickyPixels

    (@stickypixels)


    Hi there,

    I am adding some new products to my shop that are not yet available but should be visible to me (Admin) for testing purposes. So I made them ‘Private’ in the usual WP way.
    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.

    Obviously, it’s not a plugin conflict, as they all remain active when switching themes.
    But even when removing all files and coding from my own theme (except the mandatory index.php and empty stylesheet), they still don’t show up.

    So I’m assuming the Twenty Twenty theme contains some hidden code that allows private products to display, but I can’t figure it out. Checked the functions.php but that doesn’t seem to do the trick.

    Anyone out here has any clues or tips where to look?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Thread Starter StickyPixels

    (@stickypixels)

    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Make private products visible for Admin’ is closed to new replies.