sequra_shopper_country

Hook Filter

Allow changing the country of the shopper.

Description

This filter allows modifying the current shopper country code.

ParameterTypeDescription
$countrystringThe country code. Must be in ISO-3166-1 alpha-2 format

Changelog

VersionDescription
3.0.7Introduced

Usage Example

add_filter('sequra_shopper_country', function($country){
  if( is_checkout() ) {
    // Use the default value to prevent errors fetching the payment methods.
    return $country;
  }
  // Add your logic here to set the new country code...
  return 'IT'; 
});