Create Wholesale Only Content With These Special Shortcodes

Table Of Contents

    In the latest version of WooCommerce Wholesale Prices Premium we introduced several new shortcodes which allow you to show or hide content in any post, page or product or basically anywhere you can use shortcodes.

    This is super powerful as you can imagine and leads to being able to show different product page content to wholesale customers, showing hidden information like links to wholesale only resources and more.

    How To Use The Wholesale Only Content Shortcodes

    To hide content from regular users but show it to wholesale customer use:

    [wholesale_content]Here is my content that is only visible to any wholesale user[/wholesale_content]

    Or if you want to do the opposite, that is hide content from wholesale users but show to everyone else simply:

    [hide_from_wholesale]Content that any wholesale user should not see[/hide_from_wholesale]

    You can also target specific wholesale roles with these shortcodes:

    [wholesale_content role="wholesale_second_level,wholesale_third_level"]Here is my content that is only visible to the specified roles[/wholesale_content]

    And target specific wholesale roles when hiding content too:

    [hide_from_wholesale role="wholesale_second_level"]Content that is hidden from the second level wholesale role[/hide_from_wholesale]

    We hope you have fun using these new shortcodes!