Wednesday, May 13, 2020

Change displayed field value after form submit in drupal 7

$order_state = commerce_order_state_load('invoiced');
  $order_state["default_status"] = 'canceled';
  $form_state['order'] = commerce_order_status_update($order, $order_state['default_status'], TRUE);
  commerce_order_save($form_state['order']);

No comments:

Post a Comment

If you have any problem please let me know.