FOX - Currency Switcher for WooCommerce

woocs_convert_price_wcdp

The woocs_convert_price_wcdp filter is an entry point into the plugin, a narrower variant of woocs_convert_price written for discount plugins. It converts an amount from the base currency into the currently selected one, but only when the third argument is the string discount__amount. With any other value the amount is returned untouched. The extra argument exists so that a discount engine can push every number it handles through one filter, and only the fixed amounts get converted while percentages and other values pass through.
$converted = apply_filters('woocs_convert_price_wcdp', $amount, false, 'discount__amount');
Parameters:
  • $amount - the amount in the base currency
  • $is_cond_multi (bool) - false by default. When true, the conversion only happens if the "Is multiple allowed" option is enabled
  • $method (string) - convert only when this is discount__amount
Returns:
  • the converted amount, or the original one when $method is anything else