
Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on March 18, 2021, 11:27
Hello
Products can only be added in base currency
Try in file /wp-content/plugins/wc-multivendor-marketplace\core\class-wcfmmp-commission.php -add code – https://c2n.me/4b1zGzk.png
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);
}
}
Hello
Products can only be added in base currency
Try in file /wp-content/plugins/wc-multivendor-marketplace\core\class-wcfmmp-commission.php -add code – https://c2n.me/4b1zGzk.png
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);
}
}

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on March 22, 2021, 12:18
Hello
Would this code let the vendor add products in his selected currency? - No! https://c2n.me/4bov8tI.png it's impossible
This code solves the problem with calculating the commission
Hello
Would this code let the vendor add products in his selected currency? - No! https://c2n.me/4bov8tI.png it's impossible
This code solves the problem with calculating the commission