Log in
Model

CountryProvider

Magento\Payment\Model\Checks\CanUseForCountry\CountryProvider

What it does

This class determines which country should be used when validating payment method availability for a specific quote.

It provides a centralized way to retrieve the country from either the billing or shipping address, falling back to the store's default country if neither address has a country set.

Developers would use this when implementing payment method restrictions based on geographic location.

Public Methods

  • getCountry()