Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WooCommerce Notices Simplest Examples
<?php // For implementation instructions see:
* 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