Created
June 8, 2022 13:49
-
-
Save kimcoleman/4e43615656d58a47ad30d6ceffa7236e to your computer and use it in GitHub Desktop.
Show WooCommerce Store Notice to Not Logged In Visitors Only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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