sequra_shopper_country
Hook
Filter
Allow changing the country of the shopper.
Description
This filter allows modifying the current shopper country code.
Parameter | Type | Description |
---|---|---|
$country | string | The country code. Must be in ISO-3166-1 alpha-2 format |
Changelog
Version | Description |
---|---|
3.0.7 | Introduced |
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';
});
Updated about 1 month ago