taxjar / taxjar-woocommerce-plugin

WooCommerce Sales Tax Plugin by TaxJar
http://www.taxjar.com/woocommerce-sales-tax-plugin/
GNU General Public License v2.0
28 stars 29 forks source link

Add option to base tax calculations off billing address #237

Closed scottbuscemi closed 1 year ago

scottbuscemi commented 1 year ago

For SaaS companies that do not ship products, TaxJar recommends basing the tax calculations off the billing address rather than the shipping address. However, the WooCommerce plugin doesn't allow you to do this.

Please add an option to choose whether the shipping or billing address is used for calculations.

scottbuscemi commented 1 year ago

@dallendalton Is this something that could be added in the next version?

dallendalton commented 1 year ago

@scottbuscemi Thanks for submitting this request.

Are your products set as "Virtual"? For virtual products WooCommerce only collects a billing address and this address will be used in the calculations. If you have a mix of virtual and physical products, using the shipping address for calculations is the correct approach.

scottbuscemi commented 1 year ago

@dallendalton I appreciate the reply. Looks like the shipping address was imported when we migrated from another system, so that’s why they are in our system. We only have virtual products. Looks like the easiest fix (without TaxJar adding an option to only use the billing address 😄) is for us to remove all those shipping addresses. Feel free to close.

dallendalton commented 1 year ago

@scottbuscemi Happy to help! Were the addresses imported onto subscriptions or just onto customer records? Yeah that would probably be the easiest fix for now.

I am also looking into adding additional hooks into the plugin that might be able to enable this case (without affecting the default functionality). I will post an update here after I have done a bit more investigation into it.

scottbuscemi commented 1 year ago

@dallendalton Thanks! Somewhat related to this, we've had instances where customers updated their subscription's address but the sales tax wasn't updated. I still need to test this then I can create a PR...

eduardoyi commented 1 year ago

We're also having this issue. Our woocommerce store sells only virtual products, but our orders are not synced to TaxJar because they lack a shipping address, so we're basically unable to pass any of our orders to TaxJar. Is there a workaround for this that we could implement in the meantime?

ghost commented 1 year ago

Having the same problem as @scottbuscemi and @eduardoyi . We are collecting billing addresses from folks, but TaxJar won't accept the orders via sync because there's no shipping address.

@dallendalton any idea if this is going to go on the roadmap or not? We just want to know if we should expect a fix anytime soon. Thanks for all that you do.

ghost commented 1 year ago

@dallendalton also, do you guys accept pull requests from folks outside of Stripe/TaxJar? We might write this fix ourselves if you'd be willing take a look at it. We can't get into tax compliance until we get this sorted, so it's pretty critical for us.

dallendalton commented 1 year ago

@eduardoyi and @trg2, thanks for providing additional feedback! I think this may actually be a separate issue from the original but I'm going to dig into this again to make sure I didn't miss anything the first time around. Also, I would like to make sure I understand the root cause before we make any changes. The original issue dealt with the ability to use the billing address instead of a present shipping address. It appears the issue that your are experiencing appears to be that the TaxJar plugin is not finding any address on the order and so the sync to TaxJar fails.

I have just tested this on a fresh instance of WooCommerce and virtual products should work out of the box with the TaxJar plugin. When a product is set to virtual, WooCommerce by default will only collect and store the billing address. When our plugin queries for the address, it checks if the shipping address field is present on the order, and if not falls back to the billing address field.

For example: https://github.com/taxjar/taxjar-woocommerce-plugin/blob/a06a149e9c2a44d3a6bdf1009a4063bbb11b165a/includes/class-taxjar-order-record.php#L234

So if either a shipping or a billing address is set, then the order should sync successfully to TaxJar. The only scenario I can think of where this would occur would be if the sync was triggered on an order prior to it having an address added to it. This doesn't occur when the order is created through the WooCommerce checkout, but could occur if an order was created manually in the admin dashboard and no address was added to it, or possibly if the order was created dynamically through some other plugin or customization.

To help me troubleshoot this issue, could you try to manually sync an order that is failing to sync in the admin dashboard through the "Order actions" meta box?

image

Then provide me with the message in the "Sync Status" tab of the "TaxJar" meta box?

image

Also could you answer the following questions about your orders that fail to sync due to not having a shipping address:

@trg2, yes we do accept pull requests! However, we do have to balance the needs of all the users of the plugin. This means have had to reject PRs that solved individual or edge cases if they affected the functionality of the majority of users. In this case we want to keep the majority of users on the happy path for tax compliance, which means using the shipping address if available and falling back to the billing address if not.

dallendalton commented 1 year ago

We have recorded the original feature request in this issue. However, it is not currently on our short term road map. Thanks again for submitting this suggestion.

@trg2 @eduardoyi if your issue has not been resolved, feel free to open up a new issue so that it can be addressed directly.