• Resolved shoptak

    (@shoptak)


    Hello Team,

    I’m wondering if it’s possible to have different currency based on user role.

    For example I have 2 user roles:

    Role A
    Role B

    I want all users in Role A to see only $ as a site currency while Role B users will see a foreign currency I define. despite Geo Location of users in both roles.

    Note that I don’t want to use switcher between currencies for both roles.

    Thank you

    • This topic was modified 2 years, 6 months ago by shoptak.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support mediawebster

    (@mediawebster)

    Hello

    Unfortunately, the plugin does not have such a feature, you need code customization
    An example

    add_filter('wp_head',function(){    
        if(class_exists('WOOCS')  && $Current_User_Role == 'Your user role name'){
            global $WOOCS;
            $WOOCS->set_currency('USD');
        }
    });
    Thread Starter shoptak

    (@shoptak)

    Thank you for your reply.

    Unfortunately, the above code had a syntax error for more details please check the below screenshot.

    https://prnt.sc/9Nc8BTOwNUAj

    Thank you

    Plugin Support mediawebster

    (@mediawebster)

    Hello

    Of course! This is just an example!

    You need to get the user’s current role and compare it to your list of roles – https://share.stackovergo.com/image/i20220930100127.png

    If you have no experience in programming, you should ask a developer friend to do this customization

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Role Based Currency’ is closed to new replies.