WooCommerce – Cancel, Refund and Restock

I am developing a fraud prevention plugin which sends a flag whether to accept or reject the order based on several parameters.

If the flag is set to reject I need to,

Read More
  1. Cancel the order
  2. Refund
  3. Restock

I see a cancel method in WC_Order but it is for before payment. But I need to do this after payment.

Related posts