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 pleaseIf 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.
Quote from DevPt on May 3, 2023, 12:15Hi,
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
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
Quote from Pablo Borysenco on May 4, 2023, 10:02Hello
Yes it is possible. To get order ID:
$order_id = $wcfm_reverse_withdrawal_request_single->order_id;
Hello
Yes it is possible. To get order ID:
$order_id = $wcfm_reverse_withdrawal_request_single->order_id;
Quote from DevPt on May 4, 2023, 11:37Hi 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
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
Quote from Pablo Borysenco on May 4, 2023, 12:21Please 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);
}}
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);
}
}
Quote from DevPt on May 4, 2023, 12:25just 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
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
Quote from Pablo Borysenco on May 5, 2023, 09:08Hello
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);
}}
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);
}
}
Quote from DevPt on May 5, 2023, 09:22Awesome its working thank you very much Pablo !
Awesome its working thank you very much Pablo !
Quote from Pablo Borysenco on May 5, 2023, 12:21Great! Welcome;)
Great! Welcome;)