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

[ FOX LABS ] AutomateWoo - Refer A Friend Add-On by WooCommerce Adaptation Request

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 support,

Would like to request for adaptation for a plugin named AutomateWoo - Refer A Friend Add-On by WooCommerce, if possible, and it's from:

https://woocommerce.com/products/automatewoo-refer-a-friend/

The referral coupon discount amount for referral (the friend who was referred) and referral credit earned for advocate (the one who refer a friend) were not showing the correct exchanged amount with only the currency symbol changing.

Thanks and have a great day ahead!

Access details are given via private data. Thanks

Hello

Can you give the user access and a link to the page where I can see the amount of this coupon

Hi,

I've replied and gave you the relevant details via private data. Please check. Thanks

Hello

Thanks, I've added this to the adaptation queue

I'll write to you as soon as we get the result

Hello

Please  do a test

(so that the dashboard contains only the base currency)In  file - \wp-content\plugins\automatewoo-referrals\templates\account-tab.php - add  code - https://share.pluginus.net/image/i20231103190438.png

<?
if(class_exists('WOOCS')) {
global $WOOCS;
$WOOCS->current_currency = $WOOCS->default_currency;
}
?>
To convert a credit - add  in  functions.php:
add_filter( 'automatewoo/referrals/available_credit', function($credit, $user_id){

if (class_exists('WOOCS') AND $credit > 0) {
global $WOOCS;
$credit = $WOOCS->woocs_exchange_value(floatval($credit));
}

return $credit;

},10,2 );

To convert a coupon - add  in  functions.php:
add_filter( 'automatewoo/referrals/coupon_data', function($coupon_data, $coupon_code, $advocate_id, $coupon_object){

if (class_exists('WOOCS') AND $coupon_data['amount'] > 0) {
global $WOOCS;
$coupon_data['amount'] = wc_format_decimal($WOOCS->woocs_exchange_value(floatval($coupon_data['amount'])), 2 );
}

return $coupon_data;

},10,4 );

Hi, thanks !

The snippets is working in changing the currency value on cart and checkout.

However, there is still some problems in the dashboard. If the code was added in file - \wp-content\plugins\automatewoo-referrals\templates\account-tab.php, the description showing the available credit is only changing the symbol back to default currency but not the amount. And if I didnt add this code, the description showing the available credit is exchanged successfully but the credit and remaining balance in the referral table below did not exchange its amount but only the currency symbol.

I have added the relevant screenshot via private data for the situation mentioned above. Thanks

Hello

Ok!  I  will check it

 

Hello

In  file  - \wp-content\plugins\automatewoo-referrals\templates\account-tab.php - you can delete  this  code -  https://share.pluginus.net/image/i20231117160758.png

In  functions.php  I added  this  code:

add_filter( 'automatewoo/referrals/account_tab_title', function($title) {
if(class_exists('WOOCS')) {
global $WOOCS;
$WOOCS->current_currency = $WOOCS->default_currency;
}
return $title;
},10);
Please  do a test

Hi,

Tested and it's solved!

Thanks

Great!  Welcome;)