Missing prices class

parent 5b577d52
Pipeline #37 skipped
<?php
/**
* Product_Addon_cart class.
*/
class Product_Addon_Prices {
private $currency_switcher = false;
function __construct() {
if ( in_array( 'woocommerce-currency-switcher/index.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
$this->currency_switcher = true;
}
}
public function get_current_currency() {
global $WOOCS;
if($this->currency_switcher) return $WOOCS->current_currency;
return get_woocommerce_currency();
}
public function get_current_price($price) {
if($this->currency_switcher) return apply_filters('woocs_exchange_value', $price);
return $price;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment