How to Remove WooCommerce the Store Notice

WooCommerce Customizer is part of the WordPress Customizer which contains wide-site configurations that allow you to manage store notice, product catalog, as well as product mages. You would usually find it under the WordPress Dashboard: Appearance > Customizer. But we've hidden these options since there are custom options that would affect ours. In order to remove the WooCommerce store notice from your theme, you will need to add the following PHP code into your functions.php file of the child theme ( it is best to make changes on the child theme because if you make changes to the parent theme file, those configurations will be gone after a theme update). 

And please before you add any code to your child theme file, or make any changes, we recommend you take a full backup of your website. You can also use a plugin to add code to your theme files if you don't have the necessary skills and knowledge, although it is quite an easy step. If you choose the plugin route, please first make sure to install and activate the Code Snippets plugin. Follow these steps to add the code to your child theme files

  1. You will first need to have installed the child theme on your website
  2. From the WordPress Dashboard, click on Appearance > Theme Editor
  3. On the right side of the screen you have Theme Files, there choose to edit the Theme Functions (functions.php file)
  4. Scroll down and add the following code to the functions.php file
    add_action( 'init', 'kaon_update_store_notice' ); function kaon_update_store_notice() { 
    if ( get_option( 'woocommerce_demo_store_notice' ) ) { 
    update_option( 'woocommerce_demo_store_notice', false ); } }<br>
    	
  5. Make sure to remove the Kaon name from the code snippet as this is simply an exemplar of how to remove the WooCommerce store notice from a particular theme. You will need to change the name of the theme with the current active one.
  6. Click on the Update File button and that will be all


How to Remove the WooCommerce Store Notice using a plugin? 

  1. First, search for the Code Snippets plugin, install and activate the plugin 
  2. From the WordPress Dashboard, you will see a new setting appear, click on Snippets 
  3. Click on the Add New button, to create a new code snippet
  4. Add the name of the code snippet, this can be something like WooCommerce Store Notice Removal (or you can go with something shorter)
  5. Add the code we introduced above 
    add_action( 'init', 'kaon_update_store_notice' ); function kaon_update_store_notice() { 
    if ( get_option( 'woocommerce_demo_store_notice' ) ) { 
    update_option( 'woocommerce_demo_store_notice', false ); } }<br>
    	
  6. Please make sure to change the name of the theme (kaon in our case) with the name of your current active theme from the code. 
  7. You can have the code be applied everywhere on your store or choose a more specific limitation
  8. You can add a description, as well as tags for the code, as per your needs. 
  9. Once you are done, click on Save Changes and Activate 


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.