protected function BillingCountryCondition::doEvaluate in Ubercart 8.4
Evaluates if the user's billing address in one of the selected countries.
Parameters
\Drupal\uc_order\OrderInterface $order: The order.
array $countries: Array of 2-character country codes.
Return value
bool TRUE if the user billing address is in one of the given countries.
File
- uc_order/
src/ Plugin/ Condition/ BillingCountryCondition.php, line 98
Class
- BillingCountryCondition
- Provides an 'Order billing country' condition.
Namespace
Drupal\uc_order\Plugin\ConditionCode
protected function doEvaluate(OrderInterface $order, array $countries = []) {
return in_array($order
->getAddress('billing')
->getCountry(), $countries);
}