I'm using a plugin that allows you to set a global currency. However, I need to change the currency based on the page.
Is there any way to override a global variable on specific pages?
The variable I need to change is $currency. Here is what I've tried thus far based on what I've read here, but I'm not very familiar with PHP so I'm not sure how close I am to a solution.
function change_currency() {
global $currency;
if( is_page ( 18 ) ) {
$currency = "EUR";
}}
Thank you in advance.