On Woocommerce order complete, activate woosensei course
问题 I'm developing a plugin with Woocommerce and Woosensei I can't seem to get the process working of creating an order programmatically, mark the order completed and activate the woosensei course for that particular person. // create a new checkout instance and order id $checkout = new WC_Checkout(); $this_order_id = $checkout->create_order(); // add some data to the order here // [ ......... ] // execute order $order = new WC_Order($this_order_id); $order->update_status('completed'); $learning