Default contrycode
-
Hi for “Rest of the World” is the contry code AX or does this change??
-
Hi again!
First this is a great plugin!
My question is, is the “rest of the world” contry code allways AX???Hi again! Or it there a function that can check if it is test of the world?
Contry in list or elseHi,
In the country selector, the country code for “Other countries” is the first country that is not in a “price zone”, it’s general that this country be “AX”.You can get the current country by wcpbc_get_woocommerce_country();
Thx, but is there a return call if the customer is from rest of the world?
Hi,
you can use:if ( ! WCPBC()->customer->zone_id ) { //other countries }-
This reply was modified 8 years, 8 months ago by
Oscar Gare.
THX!
This will work perfectly!I wanted to detect if the customer was in zone “other countries”.
Than i could useif ( WCPBC()->customer->zone_id ) {
//Is in a Zone
}else{
//other countries
}Right?
Yes!
Hi @brodde,
If you like the plugin, please leave a 5 stars review π
Thank you in advance.Hi again Oscar!
This is a superb plugin. We will zoon upgrade to the pro version, as sson we are live with the site.Question?
With this function as you have toold i can check if a customer is in a zone or “rest of the World.
if ( WCPBC()->customer->zone_id ) {
//Is in a Zone
}else{
//other countries
}Can i also get the zone (id or name)?
Hi again Oscar!
This is a superb plugin. We will zoon upgrade to the pro version, as sson we are live with the site.Question?
With this function as you have toold i can check if a customer is in a zone or βrest of the World.
if ( WCPBC()->customer->zone_id ) {
//Is in a Zone
}else{
//other countries
}Can i also get the zone (id or name)?
Hi,
yes you can get zone_id, name, etc.. from customer variable
WCPBC()->customer->name;// zone name
WCPBC()->customer->countries;// zone countries
…
Regards,-
This reply was modified 8 years, 8 months ago by
Oscar Gare.
Thx like:
echo WCPBC()->customer->zone_id; -
This reply was modified 8 years, 8 months ago by
The topic ‘Default contrycode’ is closed to new replies.