Last active
September 1, 2017 02:37
Change the message seen by a customer after product variation is added to the Shopping Cart.
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 | |
/** | |
* Implements hook_commerce_add_to_cart_message_alter(). | |
* | |
* Apply this patch: https://www.drupal.org/node/2905624#comment-12242300 | |
* 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