Skip to content

Support different store in CountryInformationAcquirer #32743

Open
@evs-xsarus

Description

@evs-xsarus

Description (*)

The functions in \Magento\Directory\Api\CountryInformationAcquirerInterface get their data based on the current store. In custom exports to third parties, eg. and order export, one can inject this interface to get country information based on the shipping address. To get the correct information, the order's store should be used in the functions.

Currently, when eg, Spain isn't in the allowed countries for the default store, but the order's created in store that does allow Spain, the function getCountryInfo throws an exception "The country isn't available.".

To achieve this, add an optional argument to the functions, so a different store view can be provided.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready for Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions