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

Review our usages of "US" through all the code #1353

Open DanReyLop opened 6 years ago

DanReyLop commented 6 years ago

We frequently use if ( country === "US" ) or similar to decide if the user can benefit of a feature. For example, here to show the "TaxJar" option, here to show Stripe. If those services work in the US territories (such as Puerto Rico, Virgin Islands, etc), we're potentially excluding many users. We need to review all the places in the code we're hardcoding 'US', and see if we can include any or all the US territories there.

nicholasjeberlin commented 1 year ago

Ran into this today.

TaxJar does support Puerto Rico but not others such as Virgin Islands and Guam: https://support.taxjar.com/article/990-do-you-provide-support-for-reporting-filing-in-puerto-rico

The workaround I came up with was to remove Puerto Rico as a country and add it as a state, then it worked!

This snippet did the trick.