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; | |
} |
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.
Open
Last updated: July 27, 2021
0 comments
Log in to comment on this feature request.