• fzex

    (@fzex)


    Hi,

    I’m using woocommerce with a plugin that displays a list of offers instead of a single price for every product. I’d like to convert these prices in another currency. Is there a way to to that with this plugin echoing a function?

    something like:

    <?php echo (function here) ( array( ‘price’= $item[‘price’], ‘currency’=’’ ) ); ?>

    with the currency being the same selected by the users through your widget list.

Viewing 1 replies (of 1 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hi @fzex,

    If you used “Visual only” option, then price converting on frontend with JavaScript and you need to disaply price with help of WooCommerce function.

    With disabled option “Visual only” you can use this function to convert price

    $BeRocket_CE = BeRocket_CE::getInstance();
    $converted_float_price = $BeRocket_CE->return_custom_price($your_current_float_price);

    Regards,
    Oleg

Viewing 1 replies (of 1 total)
  • The topic ‘PHP convert’ is closed to new replies.