verbb / postie

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

UPS Account Number for Negotiated Rates #113

Closed bryanredeagle closed 10 months ago

bryanredeagle commented 10 months ago

Describe the bug

I updated a site to the latest plugin version and moved them away from the UPS Legacy API. The UPS API calls fail to get rates if the Account Number is entered. As you know, the account number is required to get Negotiated Rates.

Looking at the logs I found the following error: UPS: API error: “Getting unknown property: verbb\postie\providers\UPS::accountNumber”

I checked the UPS Provider class and saw that on line 411 $this->accountNumber is used rather than $this->getSetting('accountNumber') like in the rest of the code block. I made a quick edit in my vendor folder and confirmed that after changing that variable, the UPS API works and pulls the negotiated rates.

Steps to reproduce

  1. Enter an account number in the UPS Provider.
  2. Pull Shipping Rates

Craft CMS version

4.5.2

Plugin version

3.1.1

Multi-site?

No

Additional context

No response

engram-design commented 10 months ago

Yep, this fix just hadn't made it to a release yet. Fixed in 3.1.2