You are here

function commerce_xquantity_xquantity_add_to_cart_qty_prices_msg_alter in Commerce Extended Quantity 8

Implements hook_TYPE_alter().

Allows to alter or remove the 'Price adjustments for An Item:' message.

See also

\Drupal\commerce_xquantity\Field\FieldWidget\XquantityWidget::formElement()

\Drupal\commerce_xquantity\Plugin\views\field\XquantityEditQuantity::viewsForm()

File

./commerce_xquantity.module, line 73
Contains commerce_xquantity.module.

Code

function commerce_xquantity_xquantity_add_to_cart_qty_prices_msg_alter(&$msg, $widget, FormStateInterface $form_state) {

  // $msg = new $msg('Add more -> pay less for the %label!', $msg->getArguments());
  // // OR, remove the message.
  // $msg = NULL;
}