I am trying to hook into the order completion event in Ubercart, but I can't figure out which hook to use in Ubertcart 4 for Drupal 8. Has anyone managed to do this?

Many thanks.

Comments

mrphilipwarner created an issue. See original summary.

tr’s picture

Priority: Major » Normal
Issue tags: -Ubercart hooks
mrphilipwarner’s picture

For anyone else with a similar problem I thought I'd post my fix.

In uc_cart.api.php in the ubercart/uc_cart module you'll find the hook_uc_checkout_complete function, which takes the order and the user account as arguments. To get the order status I simply called $order->getStatusId().

kiwad’s picture

Status: Active » Fixed

Marking fixed per #3

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.