Automattic / woocommerce-services

WooCommerce Services is a feature plugin that integrates hosted services into WooCommerce (3.0+), and currently includes automated tax rates and the ability to purchase and print USPS shipping labels.
GNU General Public License v2.0
108 stars 20 forks source link

Subscription switching ends up zeroing out existing tax rate 0.0000% #2826

Open ryanr14 opened 3 weeks ago

ryanr14 commented 3 weeks ago

When using subscriptions alongside automated rates, I've come across an issue in this ticket that an existing tax rate (added by automated rates) gets zeroed out. This only happens when you're switching your subscription. I've had a hard time replicating this on a Pressable test site, but we can easily do this on their live & staging site. If you then disable automated rates, fix the existing zeroed out rates, this never happens again.

What would be causing our automated rate service to zero out a rate just previously used to purchase a subscription? This only happens, that we can tell, when switching subscriptions.

8889343-zen

Image

2024-11-04T01:12:21+00:00 Notice :::: TaxJar Plugin requested :::: (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:21+00:00 Notice :::: TaxJar API called :::: (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:21+00:00 Notice Received: {"tax":{"amount_to_collect":0.0,"breakdown":{"city_tax_collectable":0.0,"city_tax_rate":0.0,"city_taxable_amount":0.0,"combined_tax_rate":0.0,"county_tax_collectable":0.0,"county_tax_rate":0.0,"county_taxable_amount":0.0,"line_items":[{"city_amount":0.0,"city_tax_rate":0.015,"city_taxable_amount":0.0,"combined_tax_rate":0.06975,"county_amount":0.0,"county_tax_rate":0.0125,"county_taxable_amount":0.0,"id":"351-3efdedd66e0327c484d1dc015030190e","special_district_amount":0.0,"special_district_taxable_amount":0.0,"special_tax_rate":0.0,"state_amount":0.0,"state_sales_tax_rate":0.04225,"state_taxable_amount":0.0,"tax_collectable":0.0,"taxable_amount":0.0}],"special_district_tax_collectable":0.0,"special_district_taxable_amount":0.0,"special_tax_rate":0.0,"state_tax_collectable":0.0,"state_tax_rate":0.0,"state_taxable_amount":0.0,"tax_collectable":0.0,"taxable_amount":0.0},"freight_taxable":false,"has_nexus":true,"jurisdictions":{"city":"RIVERSIDE","country":"US","county":"PLATTE COUNTY","state":"MO"},"order_total_amount":10.0,"rate":0.0,"shipping":10.0,"tax_source":"origin","taxable_amount":0.0}} (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:21+00:00 Notice :: Tax Rate Found :: (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:21+00:00 Notice {"4":{"rate":6.975,"label":"US-MO-PLATTE COUNTY-RIVERSIDE Tax","shipping":"no","compound":"no"}} (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:21+00:00 Notice :: Updating Tax Rate To :: (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:21+00:00 Notice {"tax_rate_country":"US","tax_rate_state":"MO","tax_rate_name":"US-MO-PLATTE COUNTY-RIVERSIDE Tax","tax_rate_priority":1,"tax_rate_compound":false,"tax_rate_shipping":0,"tax_rate":6.9750000000000005,"tax_rate_class":""} (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:21+00:00 Notice Tax Rate ID Set for 4 (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:22+00:00 Notice :: Tax Rate Found :: (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:22+00:00 Notice {"4":{"rate":6.975,"label":"US-MO-PLATTE COUNTY-RIVERSIDE Tax","shipping":"no","compound":"no"}} (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:22+00:00 Notice :: Updating Tax Rate To :: (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:22+00:00 Notice {"tax_rate_country":"US","tax_rate_state":"MO","tax_rate_name":"US-MO-PLATTE COUNTY-RIVERSIDE Tax","tax_rate_priority":1,"tax_rate_compound":false,"tax_rate_shipping":0,"tax_rate":0,"tax_rate_class":""} (WCS Tax)  
Additional context
{
    "_legacy": true
}
2024-11-04T01:12:22+00:00 Notice Tax Rate ID Set for 4 (WCS Tax)  
Additional context
{
    "_legacy": true
}