PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Woocs WCFM Withdrawal Reverse

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,

I'm trying to show the right currency for each order in the withdrawal reverse section in WCFM plugin. I'm trying to insert this code :

if(class_exists('WOOCS')){
global $WOOCS;
$currencies = $WOOCS->get_currencies();
$_order_currency = get_post_meta($order_id, '_order_currency', true);
if (isset($currencies[$order_currency]) && $_order_currency != $WOOCS->current_currency){
$WOOCS->set_currency($_order_currency);
}
}

In the file (i guess it should be here, maybe i'm wrong = wcfm => controllers => wcfm => wcfm-controller-withdrawal-reverse.php) : https://www.dropbox.com/s/rv4n5fykofuwgkw/wcfm-controller-withdrawal-reverse.php?dl=0

The plugin is : https://wordpress.org/plugins/wc-frontend-manager/

 

Thanks in advance for your help,

Best Regards

Hello

Yes it is possible. To  get  order ID:

$order_id = $wcfm_reverse_withdrawal_request_single->order_id;

Hi Pablo,

Thank you for your reply

I have tried to add the $order_id = $wcfm_reverse_withdrawal_request_single->order_id; before the the WOOCS code from the line 120 of the wcfm-controller-withdrawal-reverse.php, but it still not showing the right currency, here is the code i added : 

if(!empty($wcfm_reverse_withdrawal_requests_array)) {
$index = 0;
$wcfm_reverse_withdrawal_requests_json_arr = array();
foreach( $wcfm_reverse_withdrawal_requests_array as $wcfm_reverse_withdrawal_request_single ) {
$order_id = $wcfm_reverse_withdrawal_request_single->order_id;

if(class_exists('WOOCS')){
global $WOOCS;
$currencies = $WOOCS->get_currencies();
$_order_currency = get_post_meta($order_id, '_order_currency', true);
if (isset($currencies[$order_currency]) && $_order_currency != $WOOCS->current_currency){
$WOOCS->set_currency($_order_currency);
}

}

$order = wc_get_order( $order_id );

//Status

 

Where do you think i'm wrong ?

Thanks in advance

 

Please add  this  code

$order_id = $wcfm_reverse_withdrawal_request_single->order_id;

if(class_exists('WOOCS')){
global $WOOCS;
$currencies = $WOOCS->get_currencies();
$order_currency = get_post_meta($order_id, '_order_currency', true);
if (isset($currencies[$order_currency]) && $order_currency != $WOOCS->current_currency){
$WOOCS->set_currency($_order_currency);
}

}

just added it like this but still not working :

 

if(!empty($wcfm_reverse_withdrawal_requests_array)) {
$index = 0;
$wcfm_reverse_withdrawal_requests_json_arr = array();
foreach( $wcfm_reverse_withdrawal_requests_array as $wcfm_reverse_withdrawal_request_single ) {

$order_id = $wcfm_reverse_withdrawal_request_single->order_id;

if(class_exists('WOOCS')){
global $WOOCS;
$currencies = $WOOCS->get_currencies();
$order_currency = get_post_meta($order_id, '_order_currency', true);
if (isset($currencies[$order_currency]) && $order_currency != $WOOCS->current_currency){
$WOOCS->set_currency($_order_currency);
}

}

// Status

Hello

Please try  it

if(!empty($wcfm_reverse_withdrawal_requests_array)) {
$index = 0;
$wcfm_reverse_withdrawal_requests_json_arr = array();
foreach( $wcfm_reverse_withdrawal_requests_array as $wcfm_reverse_withdrawal_request_single ) {

$order_id = $wcfm_reverse_withdrawal_request_single->order_id;

if(class_exists('WOOCS')){
global $WOOCS;
$currencies = $WOOCS->get_currencies();
$order_currency = get_post_meta($order_id, '_order_currency', true);
if (isset($currencies[$order_currency]) && $order_currency != $WOOCS->current_currency){
$WOOCS->set_currency($order_currency);
}

}

Awesome its working thank you very much Pablo !

Great!  Welcome;)