FOX - Currency Switcher for WooCommerce

WooCommerce Composite Products

Plugin link: https://woocommerce.com/products/composite-products/
  • in file wp-content\plugins\woocommerce-composite-products\includes\class-wc-cp-display.php add next code: $suffix=''; WooCommerce Composite Products
  • in file wp-content\plugins\woocommerce-composite-products\assets\js\frontend\add-to-cart-composite.js add next code:
    if (woocs_current_currency != undefined && woocs_current_currency['rate'] != undefined) {
        price_data.base_price = price_data.base_price * woocs_current_currency['rate'];
        price_data.base_regular_price   = price_data.base_regular_price * woocs_current_currency['rate'];
        composite_totals.price   = composite_totals.price   * woocs_current_currency['rate'];
        composite_totals.regular_price = composite_totals.regular_price * woocs_current_currency['rate'];
    }
    WooCommerce Composite Products
  • in file functions.php add next code:
    add_filter('woocs_fixed_raw_woocommerce_price', function($tmp_val, $product, $price) {
        if ($price == 0) {
            return $price;
        }
        return $tmp_val;
    }, 999, 3);
 
This edit is inside another plugin's file, so a plugin update will undo it. Write the change down, and re-apply it after every update of that plugin — or ask its authors to include the fix on their side, which is the only version that survives. If the change is inside FOX itself, tell us: a fix that has to be re-applied by hand is a bug on our side, not a solution.