• Resolved shaneonabike

    (@shaneonabike)


    Hey there,

    I just wanted to raise a bit of an issue that I came across. Essentially, we are using a multilingual website that IS NOT using multicurrency.

    For whatever reason your code is still being launched on line 762.

    
                if (class_exists('WCML_Multi_Currency') AND!class_exists('WOOCS')) {
                    global $woocommerce_wpml;
                    $current_currency = $woocommerce_wpml->multi_currency->get_client_currency();
                    if ($current_currency != get_option('woocommerce_currency')) {
                        $request['min_price'] = $woocommerce_wpml->multi_currency->prices->unconvert_price_amount($request['min_price']$
                        $request['max_price'] = $woocommerce_wpml->multi_currency->prices->unconvert_price_amount($request['max_price']$
                    }
                }
    

    Which is actually throwing an error and won’t render the page for the price range system. When I comment that section out it works great. It is throwing an uncaught member function I believe b/c you are attempting to access a variable that is actually null (which makes sense b/c I don’t have multi setup).

    
    PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get_client_currency() on null in wp-content/plugins/woocommerce-products-filter/index.php:764
    Stack trace:
    #0 wp-content/plugins/woocommerce-products-filter/index.php(1721): WOOF->assemble_price_params(Array)
    #1 wp-content/plugins/woocommerce-products-filter/classes/helper.php(460): WOOF->dynamic_count(Array, 'none', '')
    #2 wp-content/plugins/woocommerce-products-filter/views/shortcodes/woof_price_filter_radio.php(6): WOOF_HELPER::get_price2_filter_data('')
    #3 wp-content/plugins/woocommerce-products-filter/index.php(3338): include('/var/www/packag...')
    #4 wp-content/plugins/woocommerce-products-filter/index.php(2949): WOOF->render_html('/var/www/packag...', Array)
    
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WPML Multi Currency Bug’ is closed to new replies.