WCML_Currencies

The WooCommerce Multilingual WCML Currencies class.

Defined (1)

The class is defined in the following location(s).

/inc/currencies/class-wcml-currencies.php  
  1. class WCML_Currencies{ 
  2.  
  3. private $woocommerce_wpml; 
  4.  
  5. public function __construct( &$woocommerce_wpml ) { 
  6. $this->woocommerce_wpml =& $woocommerce_wpml; 
  7.  
  8. if( is_admin() && wcml_is_multi_currency_on() ) { 
  9. add_action( 'update_option_woocommerce_currency', array( $this, 'update_default_currency' ), 10, 2 ); 
  10.  
  11.  
  12. public function update_default_currency( $old_value, $new_value ) { 
  13.  
  14. $this->woocommerce_wpml->multi_currency = new WCML_Multi_Currency(); 
  15. $WCML_Multi_Currency_Install = new WCML_Multi_Currency_Install( $this->woocommerce_wpml->multi_currency, $this->woocommerce_wpml ); 
  16. $WCML_Multi_Currency_Install->set_default_currencies_languages( $old_value, $new_value ); 
  17.  
  18.