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_wc_cart_notices_remove_on_checkout() { | |
if ( is_checkout() ) { | |
remove_action( 'wp', array( wc_cart_notices(), 'add_cart_notices' ) ); | |
} | |
} | |
add_action( 'wp', 'sv_wc_cart_notices_remove_on_checkout', 5 ); |