Quote from devx on March 29, 2021, 23:43
Hello
I am also trying to make WOOCS work with WCFM
I have successfully managed to make the integration and register commissions, but the orders and data in the vendor dashboard is not changing with WOOCS currency switcher.
Similiar to what is described in this support ticket https://pluginus.net/support/topic/woocs-integration-with-wcfm/
Is it possible to change the order's currencies in the Vendor Dashboard/Store Manager or is it possible to display everything in Woocommerce base currency even if customer purchased using a different currency?
I have added the following to wp-content/plugins/wc-multivendor-marketplace\core\class-wcfmmp-commission.php but the data/currencies in vendor dashboard/store manager do not change. Hope you can give me some ideas on how to fix this. Thank you.
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
I am also trying to make WOOCS work with WCFM
I have successfully managed to make the integration and register commissions, but the orders and data in the vendor dashboard is not changing with WOOCS currency switcher.
Similiar to what is described in this support ticket https://pluginus.net/support/topic/woocs-integration-with-wcfm/
Is it possible to change the order's currencies in the Vendor Dashboard/Store Manager or is it possible to display everything in Woocommerce base currency even if customer purchased using a different currency?
I have added the following to wp-content/plugins/wc-multivendor-marketplace\core\class-wcfmmp-commission.php but the data/currencies in vendor dashboard/store manager do not change. Hope you can give me some ideas on how to fix this. Thank you.
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);
}
}