You are here

function uc_order_action_add_comment in Ubercart 7.3

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

Adds a comment to an order.

See also

uc_order_action_add_comment_form()

1 string reference to 'uc_order_action_add_comment'
uc_order_rules_action_info in uc_order/uc_order.rules.inc
Implements hook_rules_action_info().

File

uc_order/uc_order.rules.inc, line 705
Hooks and functions for uc_order Rules integration.

Code

function uc_order_action_add_comment($order, $comment, $comment_type) {
  uc_order_comment_save($order->order_id, 0, token_replace($comment, array(
    'uc_order' => $order,
  )), $comment_type == 'admin' ? 'admin' : 'order', $order->order_status, $comment_type == 'notified');
}