Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kimcoleman/4e43615656d58a47ad30d6ceffa7236e to your computer and use it in GitHub Desktop.
Save kimcoleman/4e43615656d58a47ad30d6ceffa7236e to your computer and use it in GitHub Desktop.
Show WooCommerce Store Notice to Not Logged In Visitors Only.
<?php
/**
* Show WooCommerce Store Notice to Not Logged In Visitors Only.
*/
function modify_woocommerce_demo_store_non_users_only( $notice_html ) {
if ( is_user_logged_in() ) {
return '';
}
return $notice_html;
}
add_filter( 'woocommerce_demo_store', 'modify_woocommerce_demo_store_non_users_only', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment