You are here

function uc_order_action_add_comment in Ubercart 5

Same name and namespace in other branches
  1. 8.4 uc_order/uc_order.rules.inc \uc_order_action_add_comment()
  2. 6.2 uc_order/uc_order.ca.inc \uc_order_action_add_comment()
  3. 7.3 uc_order/uc_order.rules.inc \uc_order_action_add_comment()

File

uc_order/uc_order_workflow.inc, line 617
This file contains the Workflow-ng hooks and functions necessary to make the order related entity, conditions, events, and actions work.

Code

function uc_order_action_add_comment($order, $settings) {
  uc_order_comment_save($order->order_id, 0, token_replace_multiple($settings['comment'], array(
    'global' => NULL,
    'order' => $order,
  )), $settings['comment_type'] == 'admin' ? 'admin' : 'order', $order->order_status, $settings['comment_type'] == 'notified');
}