FOX - Currency Switcher for WooCommerce

YITH WooCommerce Dynamic Pricing and Discounts

Plugin-URL: https://yithemes.com/themes/plugins/yith-woocommerce-dynamic-pricing-and-discounts/ Dies behebt den Fehler mit dem Mini-Warenkorb nicht und ist nicht vom WOOCS-Code abhängig.
//in file \plugins\yith-woocommerce-dynamic-pricing-and-discounts-premium\includes\functions.yith-wc-dynamic-pricing.php add next code
if (class_exists('WOOCS')) {
    global $WOOCS;
    if ($WOOCS->is_multiple_allowed) {
        $currrent = $WOOCS->current_currency;
        if ($currrent != $WOOCS->default_currency) {
            $currencies = $WOOCS->get_currencies();
            $rate = $currencies[$currrent]['rate'];
            $discount = $discount * ($rate);
        }
    }
}

if (class_exists('WOOCS')) {
    global $WOOCS;
    if ($WOOCS->is_multiple_allowed) {
        $currrent = $WOOCS->current_currency;
        if ($currrent != $WOOCS->default_currency) {
            $currencies = $WOOCS->get_currencies();
            $rate = $currencies[$currrent]['rate'];
            $rule['discount_amount'] = $rule['discount_amount'] * ($rate);
        }
    }
}


//In file \plugins\yith-woocommerce-dynamic-pricing-and-discounts-premium\includes\class-yith-wc-dynamic-pricing.php replace to code (see screen #3 below)
if (!$discount['onsale'] && ( ($product->get_sale_price() !== '' AND $product->get_sale_price() > 0) && $product->get_sale_price() !== $product->get_regular_price() ))
    

//and add next code
if (class_exists('WOOCS')) {
    global $WOOCS;
    if ($WOOCS->current_currency != $WOOCS->default_currency AND $WOOCS->is_multiple_allowed) {
        $currencies = $WOOCS->get_currencies();
        $price = $price / $currencies[$WOOCS->current_currency]['rate'];
    }
}

YITH WooCommerce Dynamic Pricing and DiscountsYITH WooCommerce Dynamic Pricing and DiscountsYITH WooCommerce Dynamic Pricing and DiscountsYITH WooCommerce Dynamic Pricing and DiscountsYITH WooCommerce Dynamic Pricing and DiscountsYITH WooCommerce Dynamic Pricing and DiscountsYITH WooCommerce Dynamic Pricing and DiscountsYITH WooCommerce Dynamic Pricing and Discounts
 
Falls weiterhin Probleme auftreten, versuchen Sie in der Datei: wp-content\plugins\woocommerce-currency-switcher\classes\woocs.php den folgenden Code zu ändern: