krokedil / klarna-payments-for-woocommerce

GNU General Public License v3.0
10 stars 18 forks source link

Prevent further order processing once processed once #363

Closed mntzrr closed 9 months ago

mntzrr commented 10 months ago

Check if the order has already been processed once. Unlike WC_Order::is_paid which is false unless the order status is processing or completed, WC_Order::get_date_paid is true if the payment has been completed which covers cases for when the order status is cancelled or refunded.

We could also check for the existence of _wc_klarna_order_id, however, that might not be set if the place order is rejected.

mntzrr commented 10 months ago

Task linked: CU-86932gy9c Fix AJAX order status change