• Resolved andbale

    (@andbale)


    Since I updated to the last version, role defaults in multicurrency module are not working anymore. USA users see Euro value and sign, instead of dollar.
    Already tried Twenty theme, nothing changes…
    Same issue with Pro version.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ronyp

    (@ronyp)

    Hello @andbale,

    My sincere apologies for the above issue. Actually, as you are using multiple plugins I can share a quick work-around for you.

    Path: /wp-content/plugins/woocommerce-jetpack/includes/class-wcj-multicurrency.php

    Before :

    public function get_default_currency() {
    	$default_currency_number = wcj_get_option( 'wcj_multicurrency_default_currency', 1 );
    	$currency                = wcj_get_option( 'wcj_multicurrency_currency_' . $default_currency_number, apply_filters( 'woocommerce_currency', get_option( 'woocommerce_currency' ) ) );
    	return $currency;
    }

    After :

    public function get_default_currency() {
    	$module_roles = wcj_get_option( 'wcj_multicurrency_role_defaults_roles', '' );
    	if ( ! empty( $module_roles ) ) {
    		$current_user_role = wcj_get_current_user_first_role();
    		if ( in_array( $current_user_role, $module_roles, true ) ) {
    			$currency = wcj_get_option( 'wcj_multicurrency_role_defaults_' . $current_user_role, '' );
    			if ( '' !== $currency && null !== $currency ) {
    				return $currency;
    			}
    		}
    	}
    	$default_currency_number = wcj_get_option( 'wcj_multicurrency_default_currency', 1 );
    	$currency                = wcj_get_option( 'wcj_multicurrency_currency_' . $default_currency_number, apply_filters( 'woocommerce_currency', get_option( 'woocommerce_currency' ) ) );
    	return $currency;
    }

    Kind Regards,
    RonyP – Support Team

    Thread Starter andbale

    (@andbale)

    Hi RonyP,
    it worked but I also had to force default currency in check box.
    Do you plan to deploy this in a future update?
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multicurrency by role not working anymore’ is closed to new replies.