s2Member’s processes have integrated functionality that can make this possible with the info from
Pre Sale FAQs » Is it possible to modify s2Member® Pro Form templates?.
Within the template file for PayPal checkout forms (/s2member-pro/includes/templates/forms/paypal-checkout-form.php), s2Member uses the code %%coupon_value%% to fill in a variable that is used in the processes under Dashboard -› s2Member® -› Pro Coupon Codes -› Affiliate Coupon Codes.
To access this property in processes outside of the affiliate coupon codes, you can use this value to create a custom variable like the ones that are created within Dashboard -› s2Member® -› General Options -› Registration/Profile Fields. A field like this might look something like this within your new template:
<input type="hidden" maxlength="100" autocomplete="off" value="%%coupon_value%%" name="s2member_pro_paypal_checkout[custom_fields][coupon]" id="s2member-pro-paypal-checkout-custom-reg-field-coupon" tabindex="100" class="s2member-pro-paypal-custom-reg-field-coupon s2member-pro-paypal-checkout-custom-reg-field-coupon" aria-required="false">
With the above, you’d then be able to access the replacement code %%coupon%% within your WordPress Dashboard anywhere that s2Member supports custom field replacement codes (like Dashboard -› s2Member® -› General Options -› Email Configuration).
s2Member
can pass the coupon’s value via
Dashboard -› s2Member® -› Pro Coupon Codes -› Affiliate Coupon Codes.
You can use the info provided through these processes and the processes under Dashboard -› s2Member® -› API / Notifications to set up an external process for sending this info.
See: Knowledge Base » Building An API Notification Handler