Product Icon

AutomateWoo - Refer A Friend add-on

Boost your organic sales by adding a customer referral program to your WooCommerce store.

Allow to send saperate Reward amount

Right now it is not possible to set different reward amount for customer and advokat. Should have option so we can set the reward for customer individually based on setting and sending campaign.


<?php
add_filter( 'automatewoo/referrals/reward_amount', 'my_automatewoo_referral_reward_amount', 10, 3 );
/**
* @param $reward_amount
* @param AW_Model_Referral_Advocate $advocate
* @param WC_Order $order
* @return mixed
*/
function my_automatewoo_referral_reward_amount( $reward_amount, $advocate, $order ) {
$advocate_user = $advocate->get_user();
$role = current( $advocate_user->roles );
if ( $role == 'administrator' ) {
$reward_percentage = 50;
}
else {
$reward_percentage = 10;
}
return $order->get_total() * $reward_percentage / 100;
}

view raw

functions.php

hosted with ❤ by GitHub

Also this information is only showing the reward for advokat and in percentage no information on how to set amount if setting is set to retail credits, its missing the information on how to set different reward price for friend based on specific custom role of advokat who send sent link to friend.

Author

mastergraphiks

Current Status

Open

Last updated: July 27, 2021

0 comments

Log in to comment on this feature request.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.