0

There is possibility do disable order statuses with "hook_commerce_order_status_info_alter" but I am wondering what happens then. Example is. Alipay has many pending statuses. I would summarize them into few or just one. But wondering what would happen then when Alipay returns some status which is not available or disabled?

1 Answer 1

0

I dig in a bit and run some custom code.

$order = commerce_order_load($order_id);
$order_status = 'payment_received';
commerce_order_status_update($order, $order_status);

and changed status. So even if status is disabled, it still is changed. Only way is to remove the status, unset it in

hook_commerce_order_state_info for whole parent state or hook_commerce_order_status_info for particular status.

What happens then is if you try to change status to the one that is not there, status will be undefined.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.