Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
176 stars 69 forks source link

ECE is not displayed when woocommerce_tax_based_on option is set to 'billing', even if the ‘Enable tax rates and calculations’ option is disabled. #9785

Closed asumaran closed 3 days ago

asumaran commented 4 days ago

Describe the bug

The ECE buttons are not displayed when taxes are set to be calculated based on the billing address while taxes and calculations are disabled.

To Reproduce

  1. Create a simple virtual product.
  2. Visit the product page and confirm that the ECE buttons are displayed.
  3. Navigate to WooCommerce > Settings.
  4. Enable taxes by checking the “Enable tax rates and calculations” checkbox.
  5. Go to WooCommerce > Settings > Tax.
  6. Set the “Calculate tax based on” option to “Customer billing address”.
  7. Return to the virtual product page and confirm that the ECE buttons are NOT displayed.
  8. Go back to WooCommerce > Settings.
  9. Uncheck the “Enable tax rates and calculations” checkbox and save.
  10. Return to the virtual product page.

Actual behavior

The ECE buttons are not displayed

Expected behavior

ECE buttons should be displayed.

The ‘Enable tax rates and calculations’ option should take precedence over the ‘woocommerce_tax_based_on’ option. If taxes are disabled, then ‘woocommerce_tax_based_on’ should not be considered