Add VAT on programmatically created order and user [closed]

Đã có trọn bộ đề thi thử THPT Quốc Gia 2022 các môn: vip.dethihsg247.com
QUẢNG CÁO: Đổi thẻ cào thành tiền mặt min rút 10k tại đây

Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange.

Closed 7 days ago.

Im using Gravity forms to create an WooCommerce order programmatically.

If email added to the form already exists, it takes the shipping and billing from the users account. This works and it adds the VAT correctly.

For a user that is not logged in, they add name, email, phone and country, and the user is created automatically. The order is created correct, and the user is added. But in this case, the AT is not added and I have to manually recalculate the order for the VAT to be added.

How do I make sure the VAT is added in this case also?

code:

Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
  • Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
  • Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
  • Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.

Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com