Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent further order processing once processed once #363

Merged
merged 1 commit into from Nov 21, 2023

Conversation

mntzrr
Copy link
Contributor

@mntzrr mntzrr commented Nov 13, 2023

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.

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 mntzrr self-assigned this Nov 13, 2023
@mntzrr
Copy link
Contributor Author

mntzrr commented Nov 13, 2023

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

@MichaelBengtsson MichaelBengtsson merged commit 5ee605b into develop Nov 21, 2023
0 of 3 checks passed
@MichaelBengtsson MichaelBengtsson deleted the develop-ajax-order branch November 21, 2023 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants