Skip to content

Set a default country for the store for tax? #369

Answered by johnrisby
johnrisby asked this question in Help
Discussion options

You must be logged in to vote

Actually, I've done it with this, although I need to add a check of course to make sure there's not already a shipping address set (change to billing address if your tax is based on that).

  useEffect(() => {
    (async () => {
      await swell.cart.update({
        shipping: {
          country: "GB"
        }
      });
    })();
  }, []);

Is there any potential problems with this approach (once I add the check for an existing country)?

Thanks

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@logeshswell
Comment options

Answer selected by logeshswell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
2 participants