verbb / postie

A Craft Commerce shipping calculator plugin.
Other
12 stars 18 forks source link

USPS: API error: “Undefined variable $countryIso” #99

Closed johnj24 closed 1 year ago

johnj24 commented 1 year ago

Describe the bug

I'm converting a Craft/Commerce 3 project to Craft/Commerce 4 and upon testing the checkout sequence, I'm getting an error when trying to select a shipping method.

'USPS: API error: “Undefined variable $countryIso” /Users/.../.../.../.../vendor/verbb/postie/src/providers/USPS.php:195'

I can confirm that the order has a shipping country applied to it. And we're only using USPS with two services: Priority Mail Medium Flat Rate Box and Media Mail.

Steps to reproduce

  1. Enable USPS
  2. Enable Medium Flat Rate Box and Media Mail
  3. On the front-end, enter your shipping address, hit submit, and look for a shipping method on the following page.

Craft CMS version

4.3.4

Plugin version

3.0.1

Multi-site?

No

Additional context

No response

engram-design commented 1 year ago

Fixed in 3.0.2