Your cart is currently empty!
Add name of product sold by affiliate to notification
—
by
Hi,
When an affiliate gets a commission I would like him to get a notification which is possible right now.
But can I add in the mail the name of product that got him the sale?
Even if I can add the woocommerce ID of the product it would be good.
Thanks,
Chen
Posted in Affiliates Enterprise
Comments
3 responses to “Add name of product sold by affiliate to notification”
Hi Oren,
To create a token, you need to understand filter and hooks in WordPress. you can see the code example below how to add token :
add_filter( ‘affiliates_notifications_tokens’, ‘example_affiliates_notifications_tokens’ );
function example_affiliates_notifications_tokens( $tokens ) {
$tokens[‘your_custom_token_name’] = ‘your custom token value’;
return $tokens;
}
Kind regard,
hendra
hi hendra,
Thanks
Can you tell me how to create this token?
Thanks,
Oren
Hi,
You need a custom implementation to do that, you can create a notification token to the mail template, please see this git repo as references :
https://github.com/geotsiokos/affiliates-addtional-tokens
FYI, the notification token is similar to a shortcode.
Kind regards,
hendra