Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Change the message seen by a customer after product variation is added to the Shopping Cart.
* Implements hook_commerce_add_to_cart_message_alter().
* Apply this patch:
* Place this code into YOUR_MODULE.module file replacing YOUR_MODULE placeholder
* with your modules' name.
function YOUR_MODULE_commerce_add_to_cart_message_alter(&$message, &$order, &$order_item) {
// Alter $message or $order or $order_item data for your needs.
// For example, do not show Add to cart message at all:
$message = [];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment