Home Forums Plugins CURCY – WooCommerce Multi Currency Display the currency

Display the currency

  • Author
    Posts
  • #91003

    Takeoff Copenhagen
    Participant

    Hi there,

    How can I display the name/code for the currency? Example : USD, EUR, …

    if( class_exists(‘WOOMULTI_CURRENCY_F_Data’) && class_exists(‘WooCommerce’) ){ / Support WooCommerce Currency Switcher /
    $currency_data_obj = new WOOMULTI_CURRENCY_F_Data();
    $currencies = $currency_data_obj->get_currencies();
    print_r($currencies);
    if( !is_array($currencies) ){
    return;
    }
    ?>
    <div class=”wcml_currency_switcher”>
    <?php echo esc_html($currency_data_obj->get_current_currency()); ?>

      <?php
      foreach( $currencies as $key => $currency ){
      $link = add_query_arg(‘currency’, $currency[‘name’]);
      echo ‘<li rel=”‘.$currency[‘name’].'”>‘.esc_html($currency[‘name’]).’‘;
      }
      ?>

    </div>
    <?php
    }

    $currency[‘name’]. I don’t know, here?

    I need it for customization purposes.

    You can see my issues here: https://snipboard.io/dgWw2N.jpg

    Attachments:
    You must be logged in to view attached files.

You must be logged in to see replies to this topic. Click here to login or register