Re: Re: ok thx

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: ok thx

Honestly, the former should work unless something screwed up on the setup of your order states/statuses. The second works because you're directly setting it to the payment_received status which is also the name of an entire order state. Tricky language, I know, but the code should work. The way to check it would be to look in your uc_order_statuses table and see what state is assigned for the payment_received status. If you wanted to put some benchmarks in the code to isolate the issue, you could put some drupal_set_message() calls in the uc_order_update_status() function.

In any event, glad it works for you as is.

Also, if you wanted to see an example of updating order status in a workflow configuration instead of hardcoding it, you can check out the function uc_payment_configuration() in uc_payment_workflow.inc.

Modify order state By: Johnny van de Laar (9 replies) Tue, 01/08/2008 - 11:04