Skip to content

Instantly share code, notes, and snippets.

@pehaa
Last active August 11, 2019 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pehaa/8d76be41c28aad9818a02dbceab499a8 to your computer and use it in GitHub Desktop.
Save pehaa/8d76be41c28aad9818a02dbceab499a8 to your computer and use it in GitHub Desktop.
Custom card notice
/* Add this snippet in your child theme functions.php file */
add_action( 'woocommerce_before_cart' , 'my_custom_cart_notice' );
function my_custom_cart_notice() {
wc_clear_notices();
wc_print_notice( 'My custom notice text comes here', 'notice' );
wc_clear_notices();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment