Support Forum

Content of the article

WPBE - WordPress Posts Bulk Editor Professional
You need to log-in to create request (topic) to the support

problem with WOOCS - WooCommerce Currency Switcher - Multi Currency and Multi Pay for WooCommerce

(new from 01-07-2019)
If you not got email within 24 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here.
The support doesn work on saturdays and sundays, so some Friday requests can be answered on Monday.

I want my woocs plugin to auto-convert default currency of store which is USD to the custom currency which is PKR at checkout and if some one click back to shop/single product page woocs should show there default currency.

Hello

You  need code customization

Try  to  add this  code in functions.php

add_filter('wp_head',function(){    
    if(is_checkout()){
        global $WOOCS;
        $WOOCS->set_currency('PRK');
    }else{
      $WOOCS->set_currency('USD');
    }
});

this is not a valid code since I paste the code in functions.php the following message I got on my homepage

Fatal error: Uncaught Error: Call to a member function set_currency() on null in /home/orthocla/public_html/wp-content/themes/kallyas-child/functions.php:111 Stack trace: #0 /home/orthocla/public_html/wp-includes/class-wp-hook.php(286): {closure}('') #1 /home/orthocla/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 /home/orthocla/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array) #3 /home/orthocla/public_html/wp-includes/general-template.php(2745): do_action('wp_head') #4 /home/orthocla/public_html/wp-content/themes/kallyas/header.php(12): wp_head() #5 /home/orthocla/public_html/wp-includes/template.php(722): require_once('/home/orthocla/...') #6 /home/orthocla/public_html/wp-includes/template.php(671): load_template('/home/orthocla/...', true) #7 /home/orthocla/public_html/wp-includes/general-template.php(41): locate_template(Array, true) #8 /home/orthocla/public_html/wp-content/themes/kallyas/framework/zion-builder/inc/index-page-builder.php(2): get_header() #9 /hom in /home/orthocla/public_html/wp-content/themes/kallyas-child/functions.php on line 111

Hello

Sorry!

add_filter('wp_head',function(){    
global $WOOCS;
    if(is_checkout()){
        $WOOCS->set_currency('PRK');
    }else{
      $WOOCS->set_currency('USD');
    }
});