Skip to content

Instantly share code, notes, and snippets.

@zorem
Last active October 20, 2020 11:54
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 zorem/d99dc234a1d07b75c38ee28d2525c8e9 to your computer and use it in GitHub Desktop.
Save zorem/d99dc234a1d07b75c38ee28d2525c8e9 to your computer and use it in GitHub Desktop.
How To Add Custom Message For Remove Cart Item
/**
* 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