Created
December 28, 2015 20:34
-
-
Save bekarice/09dc9aa578ff5cfb7d2f to your computer and use it in GitHub Desktop.
Removes WooCommerce cart notices at checkout, leaving them only on the cart page
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 | |
// only copy opening php tag if needed | |
// Removes cart notices from the checkout page | |
function sv_remove_cart_notice_on_checkout() { | |
if ( function_exists( 'wc_cart_notices' ) ) { | |
remove_action( 'woocommerce_before_checkout_form', array( wc_cart_notices(), 'add_cart_notice' ) ); | |
} | |
} | |
add_action( 'init', 'sv_remove_cart_notice_on_checkout' ); |
Worked beautifully! Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not working