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)?
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!
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.