Last active
March 15, 2018 07:09
-
-
Save JeroenSormani/376da9338e088494cb8222c9c4f9d178 to your computer and use it in GitHub Desktop.
WooCommerce Notices Simplest Examples
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 // For implementation instructions see: https://aceplugins.com/how-to-add-a-code-snippet/ | |
/** | |
* Showing default WooCommerce styles | |
*/ | |
function ace_default_woocommerce_notice_styles() { | |
if ( is_admin() ) return; | |
wc_add_notice( 'This is a Success notice', 'success' ); | |
wc_add_notice( 'This is a Error notice', 'error' ); | |
wc_add_notice( 'This is a \'Notice\' notice', 'notice' ); | |
} | |
add_action( 'woocommerce_init', 'ace_default_woocommerce_notice_styles' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment