FOX - Currency Switcher for WooCommerce

woocs_announce_aggregator

The woocs_announce_aggregator filter adds your own exchange rate source to the list a shop owner can pick in the plugin settings. Available from v.2.3.1 / 1.3.1. It is half of a pair. This filter announces that the aggregator exists and gives it a label; woocs_add_aggregator_processor supplies the code that actually fetches the rates. Registering one without the other does nothing.
add_filter('woocs_announce_aggregator', function ($aggregators) {
    $aggregators['my_bank'] = 'My Bank rates';

    return $aggregators;
});
Parameters:
  • $aggregators (array) - key is the internal id, value is the label shown in the settings
Returns:
  • (array) the aggregator list
Why you would do this: the shop must use the rate of a specific bank for accounting reasons, the business applies its own internal rate, or the built-in aggregators do not carry a currency you trade in.