WOOCS - WooCommerce Currency Switcher Professional

WooCommerce Smart Coupons by StoreApps

Plugin link: https://woocommerce.com/products/smart-coupons/

  • In file wp-content\plugins\woocommerce-smart-coupons\includes\class-wc-sc-coupon-process.php add next code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $order_currency = get_post_meta($order_id, '_order_currency', true);
            $rate = get_post_meta($order_id, '_woocs_order_rate', true);
    
            if ($order_currency != $WOOCS->default_currency) {
                $currencies = $WOOCS->get_currencies();
                if (!$rate) {
                    $rate = $currencies[$order_currency]['rate'];
                }
    
                $coupon_amount = $WOOCS->back_convert($coupon_amount, $rate, $currencies[$WOOCS->default_currency]['decimals']);
            }
        }
    }