Show WooCommerce Store Notice for Visitors Only

Store notices in WooCommerce are a great way to show a lightweight banner in your ecommerce store. This tooltip gives you custom code to hide the “Store Notice” for all logged in users. Use this method as a simple way to give “New Customers” access to special deals.

Show WooCommerce Store Notice for Visitors Only

The Code Recipe

Adding the Recipe to Your Website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. We have a post on how to create a customizations plugin on our partner website, Paid Memberships Pro.

Screenshots

Below are screenshots of the demo site with the code recipe active. This demonstrates how the Store Notice is shown for non-users (for any visitor that is not logged into the site) and hidden when the user is logged in.

WooCommerce Demo Site Screenshot For Logged In User (No Store Notice)
WooCommerce Demo Site Screenshot For Logged In User (No Store Notice)
WooCommerce Demo Site Screenshot For Visitor (Store Notice Visible)
WooCommerce Demo Site Screenshot For Visitor (Store Notice Visible)

Leverage The sitewide sales Plugin For More Features

This recipe shows a simple way to hide the WooCommerce Store Notice. If you need more robust sitewide sale banners and notification bars, try the Sitewide Sales plugin—it works with WooCommerce and other popular ecommerce plugins for WordPress.

SHARE YOUR LOVE
Kim Coleman
Kim Coleman

Hi! I'm Kim Coleman, an internet entrepreneur from Reading, PA. I've been working with WordPress for over 15 years. In 2011, I founded Paid Memberships Pro, a complete plugin for Recurring Subscriptions and Content Restriction with 100k active sites. I'm currently working on our new product, Sitewide Sales.

Articles: 35