Hi there. Thanks for the great question.Yes, I see your dilemma. Ideally, s2Member would provide details on the Coupon Code in it's Replacement Codes for the API Notification. Until we get that feature added, you can track Coupon Codes using the "custom" attribute of your Shortcode.
Here is how your Shortcode might look:- Code: Select all
[s2Member-Pro-PayPal-Form ... custom="www.yourdomain.com|<?php echo esc_attr($_POST["s2member_pro_paypal_checkout"]["coupon"]); ?>" /]
You will need to have the
Exec-PHP plugin installed for this to work.
Now you can reference the Coupon Code with s2Member's API Tracking; by referencing: %%cv1%%.
That is, Custom Value #1. Also, please remember that the "custom" attribute in your Shortcode MUST always start with your domain name. Other values can be piped in; but it MUST always start with the domain of your installation.@TODO :: add native support for Coupon Code tracking into s2Member's API Notifications.