veritrans / SNAP-Woocommerce

MIT License
19 stars 16 forks source link

Enhance order settlement didn't update order status when 3rd party Eventpress plugin is used #52

Closed RaflyLesmana3003 closed 2 years ago

RaflyLesmana3003 commented 3 years ago

https://demo.vaincode.com/mage-event/documentation/customer-order-event-emails/ order, didn't update to complete if midtrans notification handle was settlement.

i just add some minor solution for those notification handler, idk if my solution is right but it solved my prob

rizdaprasetya commented 3 years ago

Hi @RaflyLesmana3003 thanks for opening PR and letting us know 👍

On that notif handler, Midtrans as payment plugin for WooCommerce only change the payment state of the order's payment to be payment_complete, and let the CMS (WooCommerce, etc) handle the order status itself. So we don't modify the status outside of payment scope.

I think what you mean (correct me if im wrong) is when you additionally use this plugin: https://wordpress.org/plugins/mage-eventpress/ , Midtrans payment notification did not update the order to completed, right?

Hmm that's a 3rd party unofficial WooCommerce plugin, we haven't test it and don't know yet how it behave. We will need to test it first and asses on our side and see if this PR will also be beneficial for the general users of this plugin, or if somehow we can minimize any potential compromise first.

But anyway good to know you find a fix to your use-case and letting us know. Thanks!

rizdaprasetya commented 2 years ago

Hi @RaflyLesmana3003 this issue has now been covered with release of this plugin v2.30.1

You can customize the order status value to become completed via a new configuration field, no need to customize code anymore, please refer here: https://docs.midtrans.com/en/snap/with-plugins?id=advanced-customize-woocommerce-order-status-upon-payment-paid

We are using config field instead of hardcoding so that each merchant can choose what status value they prefer depending on their different use cases.

With this being implemented as config this PR unfortunately will now be closed. Thanks for opening PR and letting us know your needs!