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

Incorrect renewal order totals on the checkout when subscription was manually created #682

Open
2 tasks
mattallan opened this issue Sep 16, 2024 · 2 comments
Open
2 tasks
Assignees
Labels
type: bug The issue is a confirmed bug.

Comments

@mattallan
Copy link
Contributor

Describe the bug

Manually creating a subscription via the WooCommerce > Subscriptions > Add Subscription creates a subscription with an incorrect prices_include_tax value that does not match the stores tax settings.

When this subscription renews and customers go to pay for the pending order via the checkout, the checkout totals don't properly include the tax:

Edit Order screen:
image

❌ Checkout page:

image

When stores have their tax settings set to "I will enter prices inclusive of tax", we should be creating subscriptions with the correct value set for prices_include_tax that match the stores settings.

A few things to note from my testing:

  • This only impacts manual renewals. If I manually create a subscription and add stripe payment met and process a renewal, the transaction in stripe is for the correct amount.
  • If your store is using the block checkout, refreshing the checkout page will fix the incorrect totals problem. Refreshing the shortcode checkout does not fix it.

To Reproduce

  1. Go to WooCommerce > Settings > Tax (wp-admin/admin.php?page=wc-settings&tab=tax) and set **
    Prices entered with tax** to "Yes, I will enter prices inclusive of tax"
  2. Make sure your store has a valid tax rate (i.e. global 10%)
  3. Go to WooCommerce > Subscriptions > Add Subscription
  4. Create an active subscription with a $10 subscription product and make sure you recalculate totals to apply the tax calculations.
  5. Use the "Process Renewal" subscription action to create a pending renewal order.
  6. Go to My Account > Orders and attempt to pay for the pending order and notice the price on the checkout does not match the price of the subscription (it will have the tax amount taken off)

Product impact

  • Does this issue affect WooCommerce Subscriptions? yes/no/tbc, add issue ref
  • Does this issue affect WooCommerce Payments? yes/no/tbc, add issue ref

Additional context

@mattallan
Copy link
Contributor Author

While working on a fix in Subscriptions I realised this fix should go in WooCommerce Core as it impacts both orders and subscriptions.
I've created an issue over there: woocommerce/woocommerce#51426

Closing this.

@mattallan
Copy link
Contributor Author

PR opened in WooCommerce core: woocommerce/woocommerce#51428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

1 participant