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

Totals of pre-authorized but not yet captured orders are not editable. #3723

Open
grig-23 opened this issue Jan 14, 2025 · 2 comments
Open

Comments

@grig-23
Copy link

grig-23 commented Jan 14, 2025

Describe the bug
Starting with version 9.1.0, it is no longer possible to edit totals of pre-authorized but not yet captured orders. With version 9.0.0 these orders are editable.

Edit: I see this change in the changelog:

Update - Prevent editing of orders awaiting payment capture.

I see this pull request:

#3652

So it sounds like this never worked correctly?

Reason: The authorized amount in Stripe does not get updated with the order total. Attempting to capture payment when the order total is not the same as the authorized amount results in failure.

I asked the merchant who reported it in 9281515-zen to confirm if they were able in the past to edit order totals and capture the payment with a different than original amount.

But, on my test site, with Stripe in test mode, if I edit the total and capture - it works, this is what I see on Stripe side:

Image

To Reproduce
Steps to reproduce the behavior:

  1. Tick the Issue an authorization on checkout, and capture later checkbox in the settings of Stripe payment method, and save.
  2. With the latest version of Stripe plugin, place an order. While the order status is "on hold" or even if we change it to "pending payment" - there is no pencil icon next to totals so we can't adjut the amount before capturing the charge.
  3. Downgrade/roll back Stripe to version 9.0, and repeat the process. The pencil icon is there and totals are editable.

Expected behavior
Order totals should be editable.

Screenshots
9.0.0:

Image

9.1.0 and 9.1.1:

Image

Environment (please complete the following information):

  • WordPress Version 6.7.1
  • WooCommerce Version 9.5.2
  • Stripe Plugin Version 9.1.0, 9.1.1
  • Browser Chrome
  • Any other plugins installed yes but that shouldn't make a difference, bug confirmed on two separate sites.
@ngf-ryansteiner
Copy link

I'm the one who had Grig bring this up. I have a customer who has in the past who have edit orders to remove items and then process the order for the lower amount so it must have worked at some point, and she called me when she no longer could when her site was updated over the weekend 1/12/25. She's been on the Woocommerce + Stripe payment gateway for years and does a reasonable amount of order traffic so I trust her analysis.

@danielmx-dev
Copy link

I agree that the order totals should be editable as long as the new total is lower than the original amount. This was also brought up in the PR #3646 that made the change (unfortunately after it was merged).

Frankly, it should be possible for merchants to edit an authorized (but not yet captured) order and then capture it, as long as the total amount they end up capturing is less than or equal to the amount they first authorized. This is called a "partial capture" and it's a totally valid use case.
You can see how WooPayments handles it in the docs.

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

No branches or pull requests

3 participants