Detecting currency with PHP
-
Hey, I need to detect the active currency with PHP so I can hide or show something on the site. Here′s the code I tried with no success:
add_action( 'ocultar_preciobbva', 'bbva_ocultar' ); function bbva_ocultar() { if ( class_exists( 'WOOMULTI_CURRENCY_F_Data' ) ) { $currency_data_obj = new WOOMULTI_CURRENCY_Data(); $current_currency = $currency_data_obj->get_current_currency(); if ( $current_currency == 'USD' ){ ?><script type="text/javascript"> var bbvatext = document.getElementById("preciobbva"); bbvatext.style.display = "none"; console.log("NO MAS BBVA"); </script><?php } } else { } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Detecting currency with PHP’ is closed to new replies.