FOX - Currency Switcher for WooCommerce
CODEX

Shortcodes, Hooks & Functions

Complete reference for FOX – WooCommerce Currency Switcher

Compatibility 140
  1. apply_filters woocs_add_aggregator_processor Registers the code that fetches rates from your own exchange rate source. Works in pair with woocs_announce_aggregator. From v.2.3.1 / 1.3.1.
  2. apply_filters woocs_add_custom_rate Changes a currency rate on the fly, or replaces rate fetching entirely with your own logic. From v.2.3.1 / 1.3.1.
  3. apply_filters woocs_announce_aggregator Adds your own aggregator to the list the shop owner can choose from in the settings. Works in pair with woocs_add_aggregator_processor. From v.2.3.1 / 1.3.1.
  4. apply_filters woocs_back_convert_price Entry point into the plugin: converts an amount from the currently selected currency back into the shop base currency. The fix for third-party rules that compare converted totals against base-currency thresholds.
  5. apply_filters woocs_bank_polski_table Selects which rate table of the Narodowy Bank Polski aggregator to read. Default is table A. From v.2.3.1 / 1.3.1.
  6. apply_filters woocs_capability_allows_change_order Lets chosen users edit order currency data without granting them the full manage_options capability.
  7. apply_filters woocs_convert_price Entry point into the plugin: converts an amount from the base currency into the currently selected one. The standard way for a third-party plugin to become currency aware without a hard dependency on FOX.
  8. apply_filters woocs_convert_price_wcdp Entry point into the plugin for discount engines: converts an amount from the base currency into the current one, but only when the third argument is discount__amount.
  9. apply_filters woocs_cookie Filter changing the name of the FOX session cookie. Renaming it stops caches that treat any wp_-prefixed cookie as a logged-in user from bypassing the cache. Must be registered from mu-plugins.
  10. apply_filters woocs_currency_data_manipulation Filters the whole currency table before the plugin uses it — rates, symbols, decimals and positions — so currency data can come from anywhere you like.
  11. apply_filters woocs_currency_manipulation_before_show Filters the currency list just before the switcher is drawn, so you can hide, reorder or relabel currencies per page, per user or per any rule.
  12. apply_filters woocs_currency_symbol_on_order Filter that tells FOX to leave the currency symbol untouched on the order-received and account pages, so a receipt keeps the symbol of the currency the order was paid in. Default false.
  13. apply_filters woocs_currency_symbols Adds or replaces currency symbols. The hook to use for a custom currency symbol in WooCommerce, or for a currency that has no standard glyph at all.
  14. apply_filters woocs_currname_in_option Changes the text of a currency line inside the switcher drop-down, when the default code plus symbol is not what your customers should read.
  15. apply_filters woocs_cut_cart_price_format Drops the custom price format on the cart and checkout pages, where a decorated format sometimes fights with other plugins.
  16. apply_filters woocs_disable_backend_refund_calculation Turns off currency conversion while a refund is processed in wp-admin, for shops that store refunds in the base currency by policy.
  17. apply_filters woocs_drop_down_view Switches the currency switcher drop-down skin on the fly, so different pages or user groups can get different switcher designs.
  18. apply_filters woocs_fixed_price_user_rope Filter passing the price resolved by the prices-based-on-user-role feature, along with the product ID, the price type and the user roles. Note the typo in the hook name: rope, not role.
  19. apply_filters woocs_fixed_raw_woocommerce_price Filters the raw price when fixed per-currency prices are in play. The usual attachment point for making a third-party pricing plugin respect fixed prices.
  20. apply_filters woocs_form_method Changes the switcher form method from POST to GET, which some caching setups and page builders need. From v.2.2.0 / 1.2.0.
  21. apply_filters woocs_geobone_ip Filter controlling the first-visit-only behaviour of the Geo IP rules. Returning false disables the flag that makes a geo rule apply once per visitor. Default true.
  22. apply_filters woocs_get_approximate_amount_text Changes the wording around the approximate amount shown on the cart and checkout pages when the "Show approx. amount" option is on.
  23. apply_filters woocs_init_compatibility_woo_subscriptions Switches on compatibility with WooCommerce Subscriptions, so renewal amounts keep the currency the subscription was created in.
  24. apply_filters woocs_order_formatted_prices Controls price formatting on the order and thank-you pages. Return false to leave WooCommerce formatting alone entirely.
  25. apply_filters woocs_precision_on_calc Raises the internal calculation precision. Needed when unit prices are very small — at four decimals a 0.000423 item rounds to nothing.
  26. apply_filters woocs_price_decimal_sep Sets the decimal separator per currency or per any other rule, so each market reads prices the way it expects.
  27. apply_filters woocs_price_format Filters the whole WooCommerce price format string, for full control over where the symbol sits and what surrounds the number.
  28. apply_filters woocs_price_html Filters the finished price markup of a product. The hook for adding a custom currency symbol, a note or any markup of your own to every price on the shop.
  29. apply_filters woocs_price_html_tail Appends text or markup after a product price on shop and category pages — an approximate amount, a tax note, a per-unit hint.
  30. apply_filters woocs_price_shortcode Filters the price produced by the [woocs_price] shortcode, so a price printed outside the product loop can follow its own rule.
  31. apply_filters woocs_price_thousand_sep Sets the thousand separator per currency or per any other rule, so 1,299.00 and 1 299,00 can live on the same shop.
  32. apply_filters woocs_product_fixed_price_data_simple_types Declares which product types fixed per-currency prices apply to, so a custom product type can join in.
  33. apply_filters woocs_raw_woocommerce_price Filters the raw numeric price before formatting. This is where price rounding rules live — to 50 cents, to 99 cents, to a whole unit.
  34. apply_filters woocs_redraw_cart Disables mini-cart redrawing after a currency switch, which resolves conflicts with themes and scripts that rebuild the cart themselves.
  35. apply_filters woocs_show_side_swither Filter with the final say on whether the floating side switcher is rendered on the current page, applied after the plugin's own settings and exclusions. Note the typo in the hook name: swither.
  36. apply_filters woocs_side_switcher_data Filter passing the whole configuration array of the side switcher — skin, side, offset, colours and field templates — before the panel is rendered.
  37. apply_filters woocs_woocommerce_available_variation Filter passing the data array of a single variation after FOX converted its prices, including price_html, on its way to the front end as JSON.
  38. apply_filters woocs_woocommerce_variation_prices Filters the price range of a variable product, so the from-to line on a variable product follows your own currency logic.
  1. fn() $WOOCS->back_convert() Converts an amount from the currently selected currency back into the shop base currency — the fix for third-party code that compares a converted total against a base-currency threshold.
  2. fn() $WOOCS->convert_from_to_currency($value, $from_currency, $to_currency) Converts an amount between any two currencies directly, without going through the base currency. Available from v.2.4.0 / v.1.4.0.
  3. fn() $WOOCS->current_currency The property holding the currency the visitor is browsing in right now. The starting point for almost any custom currency logic.
  4. fn() $WOOCS->default_currency The property holding the shop base currency, the one WooCommerce itself is configured with and the one every rate is calculated against.
  5. fn() $WOOCS->get_checkout_page_id() Returns the ID of the checkout page, so your own code can tell reliably whether the current request is the checkout.
  6. fn() $WOOCS->get_currencies($suppress_filters = false) Returns every currency configured in the plugin settings, with its rate, symbol, decimals and position — the whole currency table as an array.
  7. fn() $WOOCS->get_currency_by_country() Returns the currency the Geo IP rules resolve for the visitor country. Works only while the Geo IP option is enabled.
  8. fn() $WOOCS->get_currency_price_num_decimals() Returns how many decimals a given currency is configured to show, so your own price output matches the rest of the shop.
  9. fn() $WOOCS->get_geo_rules() Returns the Geo IP rules array — which country maps to which currency — for reading or acting on from your own code.
  10. fn() $WOOCS->get_welcome_currency() Returns the welcome currency: the one a first-time visitor sees before making any choice of their own.
  11. fn() $WOOCS->is_multiple_allowed The property that tells you whether multi currency checkout is enabled, that is, whether customers may pay in the currency they selected.
  12. fn() $WOOCS->is_use_geo_rules() Returns true when the Geo IP option is enabled, so your code can branch on whether country rules are in play at all.
  13. fn() $WOOCS->make_rates_auto_update() Runs a full exchange rate update immediately, the same one the built-in cron performs. Use it to drive updates from a real server cron.
  14. fn() $WOOCS->reset_currency() Resets the visitor back to the shop base currency — useful when a third-party process must run in base-currency context.
  15. fn() $WOOCS->set_currency() Sets the currency for the current visitor from your own code, whatever logic you need. Available from v.2.1.8 / v.1.1.8.
  16. fn() $WOOCS->storage->get_val() Reads a value from the FOX storage layer — the selected currency among others — whichever storage backend the shop is configured with.
  17. fn() $WOOCS->storage->set_val() Writes a value into the FOX storage layer, so custom code can persist state alongside the plugin instead of inventing its own session.
  18. fn() $WOOCS->woocs_exchange_value() Converts an amount from the shop base currency into the currency the visitor selected — the everyday conversion call.
  19. fn() REST API REST API endpoints for reading currency data and product prices programmatically, for headless front ends, mobile apps and external integrations.