Skip to content

order country problem #41

@proseLA

Description

@proseLA

i am sporadically getting the following error:

--> PHP Warning: Undefined array key "country" in 
/blahBlahBlah/includes/modules/shipping/upsoauth/UpsOAuthApi.php on line 296.

now, i think you will want to know how the country id is not set... but i would think lets just let UPS figure out whether the address is correct. ZC and its address setup has always been problematic to me; and i agree that tracking down how the country is not set would be ideal... but how about a solution. from:

'StateProvinceCode' => zen_get_zone_code((int)$order->delivery['country']['id'], (int)$order->delivery['zone_id'], ''),

to:

'StateProvinceCode' => zen_get_zone_code((int)($order->delivery['country']['id'] ?? STORE_COUNTRY), (int)$order->delivery['zone_id'], ''),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions