WOOCS - WooCommerce Currency Switcher

WCFM Marketplace by WC Lovers

Plugin URL: https://wordpress.org/plugins/wc-multivendor-marketplace/

  • in  file  wp-content/plugins/wc-multivendor-marketplace\core\class-wcfmmp-commission.php add next code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        $_order_currency = get_post_meta($order_id, '_order_currency', true);
        $order_rate = get_post_meta($order_id, '_woocs_order_rate', true);
        $currencies = $WOOCS->get_currencies();
        if (!$order_rate) {
            if (isset($currencies[$_order_currency])) {
                $order_rate = $currencies[$_order_currency]['rate'];
            }
        }
        if ($order_rate) {
            $commission_amount = $WOOCS->back_convert($commission_amount, $order_rate, 2);
        }
    }