Quick view shows wrong currency with (WPML multi currency)
-
Hi
I have two currency on my website (USD, GEL)When i check product with (quick view) the currency is US Dollar (default currency) in both case.
I asked wpml for support but there were not able to solve the issue. Did you guys ever had similar case?
Maybe you could help out?
I have found a similar code, maybe you could do some modification
/**
* Add this code to the functions.php file of your theme.
*/
add_filter( 'wcml_load_multi_currency_in_ajax', 'do_not_load_multi_currency_in_ajax', 10, 1 );
function do_not_load_multi_currency_in_ajax( $load ) {
if ( is_checkout() ) {
$load = false; // If this is the checkout page, do not load multi-currency filters in AJAX actions
}
return $load;
}
Thank you in advance best regards
Merabi
Hi,
Try to add the following PHP code snippet to the child theme functions.php file to do this
function woodmart_wpml_compatibility( $ajax_actions ) {
$ajax_actions[] = 'woodmart_ajax_add_to_cart';
$ajax_actions[] = 'woodmart_quick_view';
return $ajax_actions;
}
add_filter( 'wcml_multi_currency_ajax_actions', 'woodmart_wpml_compatibility', 10, 1 );
Regards
Hi
Im using Basel theme, so should i use this code?
function woodmart_wpml_compatibility( $ajax_actions ) {
$ajax_actions[] = 'woodmart_ajax_add_to_cart';
$ajax_actions[] = 'woodmart_quick_view';
return $ajax_actions;
}
add_filter( 'wcml_multi_currency_ajax_actions', 'woodmart_wpml_compatibility', 10, 1 );
Sorry, replace with this one
function basel_wpml_compatibility( $ajax_actions ) {
$ajax_actions[] = 'basel_ajax_add_to_cart';
$ajax_actions[] = 'basel_quick_view';
return $ajax_actions;
}
add_filter( 'wcml_multi_currency_ajax_actions', 'basel_wpml_compatibility', 10, 1 );
Thank you very muck for quick response