FOX - Currency Switcher for WooCommerce

woocs_geobone_ip

The woocs_geobone_ip filter controls the "first visit only" behaviour of the Geo IP rules. By default FOX applies a Geo IP rule once per visitor: on the first request it stores a flag, sets the currency for the detected country and does not touch the choice again, so a visitor who then switches currency manually keeps their choice for the rest of the session. Returning false from this filter disables that first-visit bookkeeping, and the geolocation branch is then evaluated on the terms of whatever state the storage is in.
add_filter('woocs_geobone_ip', '__return_false');
Parameters:
  • $state (bool) - true by default
Returns:
  • (bool) false to skip the first-unique-visit flag
Note: Geo IP rules require the WooCommerce geolocation class, so nothing here runs unless WC_Geolocation is available and geo rules are enabled in the plugin settings.