monero-integrations / monerowp

Monero WooCommerce Plugin for Wordpress
MIT License
105 stars 74 forks source link

Set Order Status to "Processing" Rather than "Completed" When Payment Received #111

Closed eclipse1482 closed 1 year ago

eclipse1482 commented 1 year ago

Currently, the Woocommerce Order Status is updated to Completed when the payment is received. Is there any way we can change this to "Processing" rather than "Competed"?

BrianHenryIE commented 1 year ago

Replace these lines:

https://github.com/monero-integrations/monerowp/blob/9ba2b640f7bd31441f9994dd66916bf480ed9016/include/class-monero-gateway.php#L395-L399

With:

$order->payment_complete();

WooCommerce takes care of conditionally setting the order status to processing or complete so this plugin shouldn't be bothering to do that too. See: class-wc-order.php

eclipse1482 commented 1 year ago

Thank you. I also noticed that my issue was that my test product is virtual only which causes it to return as "completed". Everything is working as expected. Thank you!