• Resolved Sajid Manzoor

    (@sajiddesigner)


    Is there any way to check which currency is enabled. i want to show/hide some text on specific currency. for eg

     if($currency=='PKR'){
       $msg='Free Shipping to all over Pakistan';
    } else {
       $msg='Free shipping on all orders over US $ 100';
    }

    Plz suggest how can i do this.

    thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    All zone’s data is available in the front-end by the WCPBC()->customer variable.

    Thread Starter Sajid Manzoor

    (@sajiddesigner)

    Hello
    i checked and it returns following, if i am logged in from admin user

    WCPBC_Customer Object ( [_data:protected] => Array ( ) [_changed:WCPBC_Customer:private] => 1 ) 
    

    If i am not logged in then it shows

    WCPBC_Customer Object ( [_data:protected] => Array ( [name] => Pakistan [countries] => Array ( [0] => PK ) [currency] => PKR [exchange_rate] => 104.77 [zone_id] => pakistan [timestamp] => 1494664841 ) [_changed:WCPBC_Customer:private] => 1 )

    not`ed that i want to show message for both general visitor and logged in user based on selected currency.

    • This reply was modified 7 years, 10 months ago by Sajid Manzoor.
    Thread Starter Sajid Manzoor

    (@sajiddesigner)

    Your suggestion didn’t worked. i figured this out using get_woocommerce_currency();

    Thank you for help .

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Check which currency is enabled’ is closed to new replies.