Last active
October 20, 2020 11:54
-
-
Save zorem/d99dc234a1d07b75c38ee28d2525c8e9 to your computer and use it in GitHub Desktop.
How To Add Custom Message For Remove Cart Item
This file contains hidden or 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
/** | |
* change message of remove cart item in woocommerce | |
**/ | |
function change_remove_cart_item_message($message,$product) { | |
return sprintf( __( '%s has been removed from your cart because it can no longer be purchased. Please contact us if you need assistance.', 'woocommerce' ), $product->get_name() ); | |
} | |
add_filter( 'cbr_cart_item_removed_message', 'change_remove_cart_item_message', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment