Thread Starter
kero83
(@kero83)
Hi,
Can i add that hook to plugin that Aelia support suggested?
If the authors of the plugin take too long to update it, a potential workaround is to write an external filter to intercept the amount to be converted. For this to be possible, the omnibus plugin must provide a hook that you can use to alter the amount before it’s displayed. The plugin’s authors can tell you if that’s the case.
Once you have the hook, you can write a filter like the following:
add_filter(‘<SOME FILTER FROM THE OMNIBUS PLUGIN>’, function($omnibus_plugin_amount) { // Conver the amount from the shop’s base currency to the active currency return apply_filters(‘wc_aelia_cs_convert’, $omnibus_plugin_amount, get_option(‘woocommerce_currency’), get_woocommerce_currency());}, 10, 1);
You will have to replace <SOME FILTER FROM THE OMNIBUS PLUGIN> with the filter provided by the omnibus plugin’s developers, and that should be sufficient to convert the values.
Joni