multi_currency) && is_object($woocommerce_wpml->multi_currency) ){ $price = $woocommerce_wpml->multi_currency->prices->unconvert_price_amount( $price ); } /** * https://wordpress.org/plugins/woocommerce-currency-switcher/ */ global $WOOCS; if(class_exists('WOOCS') && is_object($WOOCS)){ $price = $WOOCS->woocs_back_convert_price($price); } return $price; } } if(!function_exists('pisol_cefw_multiCurrencyFilters')): function pisol_efrs_multiCurrencyFilters($price){ if( empty($price) ) return $price; /** * for doing currency conversion of fees for multiple currency plugin * https://wordpress.org/plugins/woo-multi-currency/ */ $price = apply_filters( 'wmc_change_raw_price', $price ); /** * WPML multi currency */ $price = apply_filters( 'wcml_raw_price_amount', (float)$price); /** * https://wordpress.org/plugins/woocommerce-currency-switcher/ * Documentation: https://currency-switcher.com/function/woocs-woocs_exchange_value/ */ global $WOOCS; if(class_exists('WOOCS') && is_object($WOOCS)){ $price = $WOOCS->woocs_exchange_value($price); } return $price; } endif; if(!function_exists('pisol_efrs_CurrencyValid')): function pisol_efrs_CurrencyValid($rule_id){ $valid = true; $pi_currency = get_post_meta( $rule_id, 'pi_currency', true ); if(empty($pi_currency) || !is_array($pi_currency)){ return $valid; } $current_currency = apply_filters('pi_efrs_current_currency', get_woocommerce_currency()); if(!in_array($current_currency, $pi_currency)){ $valid = false; } return $valid;; } endif;