Your cart is currently empty!
Stats referrals
—
by
Hey! Sorry for my English.
Affiliates Enterprise plugin – shortcode [affiliates_affiliate_stats type=”stats-referrals” data=”user_email”/]:
1. How can I display the buyer’s email from the order? (default is user_email)
2. How to display Order No. now in the format:
Protected: Order – February 8, 2022 @ 10:41 AM
in format: Protected: Order #2028 – February 8, 2022 @ 10:41 AM
Posted in Affiliates Enterprise
Comments
3 responses to “Stats referrals”
You’re welcome!
Thanks!
Hi Tatiana,
Welcome to our support forum and many thanks for choosing Affiliates Enterprise for your site.
The [affiliates_affiliate_stats ... ] shortcode can be modified using the affiliates_affiliate_stats_renderer_data filter hook. There is an example implementation link in the hook description but also another example here you can refer to and perhaps use for your own implementation. The customer email can be found in the order which in turn can be retrieved by the $result->post_id, it keeps the id of the order but if you are not tracking only referrals on orders, then it would be better if you also check that the post_id indeed belongs to an order.
Apart from that IMO it would be easier if you use the Affiliates Dashboard Referrals section and simply modify the template for that section. With Affiliates Dashboard you can override the default template and use your own modified version through your theme folder. Please have a look at Templates, referrals-enterprise.php and referrals-entry.php template files.
Kind regards,
George