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

Implement missing refund tax methods for HPOS #34805

Merged
merged 6 commits into from Oct 13, 2022

Conversation

vedanshujain
Copy link
Contributor

@vedanshujain vedanshujain commented Sep 23, 2022

All Submissions:

Changes proposed in this Pull Request:

Implements remaining get_total_tax_refunded and get_total_shipping_refunded methods for HPOS data store.

How to test the changes in this Pull Request:

While HPOS as active

  1. Enable taxes and add a sample tax rate (also enabled for shipping).
  2. Create a new order, add some products and add a shipping rate. Calculate taxes.
  3. In a shell prompt, test the implementation like so:
$order_id = XX; //Your order ID.
$order = wc_get_order( $order_id );
$order->get_data_store()->get_total_tax_refunded( $order );
$order->get_data_store()->get_total_shipping_refunded( $order );

Alternatively, check unit tests and see if they make sense.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm changelog add --filter=<project>?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Sep 23, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 23, 2022

Test Results Summary

Commit SHA: de22a84

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests18800201900m 57s
E2E Tests186003018913m 28s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@vedanshujain vedanshujain requested review from a team and Konamiman and removed request for a team September 23, 2022 13:01
Konamiman
Konamiman previously approved these changes Oct 11, 2022
@Konamiman Konamiman self-requested a review October 13, 2022 08:53
@Konamiman Konamiman merged commit b6439c6 into trunk Oct 13, 2022
@Konamiman Konamiman deleted the implement/order_table_tax_methods branch October 13, 2022 08:57
@github-actions github-actions bot added this to the 7.1.0 milestone Oct 13, 2022
@github-actions
Copy link
Contributor

Hi @Konamiman, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

@oujisan2236
Copy link

hi there

issue now is this

on orders when you view them in the backend wp-admin/post.php?post=example&action=edit

lets say

cost qty total vat

will show cost then the qty but total is without vat and then vat so cost is repeated twice without a total

cant see what the cost plus vat is without using a calculator to make sure its right... was not like this before 7.1

for example
https://ibb.co/yWzK3CR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants