veritrans / SNAP-Woocommerce

MIT License
19 stars 16 forks source link

custom change status when transaction success #30

Closed rianrismawati closed 4 years ago

rianrismawati commented 4 years ago

How I can custom change status when transaction success ? ex : when transaction success status in dashboard woocommerce on-hold to "confirmed" .. in default on-hold to processing

Thankyou

rizdaprasetya commented 4 years ago

Hi @rianrismawati confirmed is not in the official list, you should understand order status from the official Woocommerce docs: https://docs.woocommerce.com/document/managing-orders

We only follow the official documentation and order status explained here: https://docs.woocommerce.com/document/managing-orders/#section-13

Payment provider are instructed to call $order->payment_complete();, we do it here: https://github.com/veritrans/SNAP-Woocommerce/blob/1d8625dee2a4f79117e567e9941d06ba7b6aa368/class/class.midtrans-gateway.php#L751 and here: https://github.com/veritrans/SNAP-Woocommerce/blob/1d8625dee2a4f79117e567e9941d06ba7b6aa368/class/class.midtrans-gateway.php#L732 You can change the implementation on that line if needed.

Here are some custom implementation references:

Thanks