Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adrianovarlotta/7349e07921e9432df1ada81494f8e266 to your computer and use it in GitHub Desktop.
Save adrianovarlotta/7349e07921e9432df1ada81494f8e266 to your computer and use it in GitHub Desktop.
Woocommerce - display coupon add notice to another pages
$coupons = WC()->cart->get_applied_coupons();
if ( $coupons ) {
wc_print_notice( 'Coupon ' . implode( ', ', $coupons ) . ' has been applied to your cart.', 'notice' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment