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

Fix installment payment when admin manually pay for order #388

Merged
merged 9 commits into from
Aug 7, 2023

Conversation

aashishgurung
Copy link
Contributor

@aashishgurung aashishgurung commented Aug 4, 2023

1. Objective

Fix installment payment when admin manually pay for order.

2. Description of change

Installment payment was not functioning properly when admin manually pay for order because the total amount was 0. This happened because logic was getting the total from the cart. But, cart is not present when admin pay for an order. So, we added a check that will get the total amount from order if the payment page is triggered by admin. If not then we get the total from cart.

Screenshot 2566-08-04 at 09 43 19

3. Quality assurance

Specify where and how you tested this and what further testing it might need.

🔧 Environments:

  • WooCommerce: v7.8.2
  • WordPress: v6.2.2
  • PHP version: 8.1
  • Omise WooCommerce: 5.1.1

@aashishgurung aashishgurung merged commit 9e78008 into develop Aug 7, 2023
3 checks passed
@danfowler danfowler deleted the feature/MIT-1562 branch August 7, 2023 03:26
@danfowler danfowler restored the feature/MIT-1562 branch August 7, 2023 03:26
@aashishgurung aashishgurung mentioned this pull request Aug 9, 2023
aashishgurung added a commit that referenced this pull request Aug 9, 2023
* Fixed Japanese translation issue in secure form.

* Used locale instead of hardcoded en

* Fix installment payment when admin manually pay for order (#388)

* [MIT-1562]: Total amount for payment is pulled from order instead of cart when the payment page is triggered from admin.

* Fixed the issue with Japanese language Support in the secure form.

* Added unit test for installment

* Added unit test for installment

* Updated test

* Fix indentation

* Fix the tests after code chagne.

* Fix the spelling mistake.

* Reverted secure form changes.

---------

Co-authored-by: Aashish <aashish@omise.co>

* Updated metadata for v5.2.1

---------

Co-authored-by: (AJ) Zin Kyaw Kyaw <108650842+ajzkk@users.noreply.github.com>
Co-authored-by: Aashish <aashish@omise.co>
@aashishgurung aashishgurung deleted the feature/MIT-1562 branch August 18, 2023 10:25
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

3 participants