• Resolved hoy

    (@whereskarlo)


    Hello, can this plugin convert something other than a manually specified number, such as the order total? I would do this via php.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor David Artiss

    (@dartiss)

    If you head to the instructions and scroll down to the bottom of the section named “?? USING TEMPLATES” you’ll find details on how to call it from your code.

    Thread Starter hoy

    (@whereskarlo)

    Thank you! Just to clarify, can the ‘number’ parameter be anything else except a number, such as a function to fetch the order total (which will be a number once fetched)?

    Plugin Contributor David Artiss

    (@dartiss)

    If you’re writing this in code, you’d call your function to fetch the order total, and then pass it onto the function get_conversion, and just append onto the end the extra parameters required.

    For example…

    $order_total = your_function();
    $converted_total = get_conversion( 'number=' . $order_total . '&from=gbp&to=usd' );
    Thread Starter hoy

    (@whereskarlo)

    Alright, thanks a lot of the explanation. Are you open to write some code in exchange for payment? I am trying to do the following:

    1. Save converted order total based on payment method to the order custom field
    2. On the thank you page, new order email and account page, display a generic text based on the payment method, that includes the order total and converted total from the custom field
    3. Small amount of logic of when to display the text (ON HOLD order status)

    Let me know. In any case, thanks for making a super useful plugin!

    Plugin Contributor David Artiss

    (@dartiss)

    No, I’m not available to do this. However, any WordPress developer should be able to do this for you, without any issue.

    Thread Starter hoy

    (@whereskarlo)

    Ok, thanks for answering.

    Thread Starter hoy

    (@whereskarlo)

    So, ChatGPT has created the code for me after ~4 hrs of prompts and fine tuning. Completely groundbreaking.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Convert order total instead of number?’ is closed to new replies.