Hi There,
Thanks for the great question!
s2Member currently has a wide selection of Shortcodes that you can find under Dashboard -› s2Member® -› PayPal® Options -› Specific Post/Page Confirmation Email. However, date is not yet supported by these replacement codes. I have put in a request for this to be added in a future version of s2Member. In the meantime, there are some ways to accomplish this, and access other information as well.
This is the most expandable, and customize-able way to accomplish this. I’d highly recommend using this method if you’re familiar with working with PHP’s $_REQUEST array, and are familiar with the wp_mail() function.
In short, you’ll want to use the info within the replacement codes available under Dashboard -› s2Member® -› API / Notifications -› Specific Post/Page Sale Notifications to run a PHP script every time s2Member processes a transaction. The info that you have access to within a PHP script outside of s2Member, hooked into like this, would be unrestricted.
Because you’re simply sending an email as of now, you may get away with linking this directly, and firing the email every time, using the wp_mail() function. Remember, though, if you’re looking to expand this functionality in the future, you’ll want to integrate some further checks to ensure that the data you’re receiving is the correct. To do this, I’d recommend hooking into the ws_plugin__s2member_during_paypal_notify_before_sp_access action. Here you can set a variable that you can check through your PHP script, using the info provided under Knowledge Base » Protecting Non-WordPress Content with s2Member.
This method’s more of a quick-and-dirty solution. I would only recommend doing this if you’re looking for a really quick fix without much code knowledge.
You can use the info outlined here: Video » s2Member (Custom Fields Dynamically?) to create a custom field within s2Member that holds whatever info you need it to dynamically. Remember that you can use CSS styles on custom fields, and hide the field with display: none; .
You can then use the info provided in the replacement codes section under Dashboard -› s2Member® -› API / Notifications -› Specific Post/Page Sale Notifications to access the custom field that you need.
If you’re not too worried about future updates, and want a more streamlined way to do this, you can edit the appropriate PayPal processing file (in this case, /s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php) and take a look at the processes for replacing shortcodes. In this case, the processes start at line 119.
|
Hi Bruce,
Thanks for the great reply. :)
Before I start wading into shortcode adjustment, I wonder what sort of timeline you think it might be before it might be included?
Thanks
|
Hi there,
Thanks for the follow-up
Before I start wading into shortcode adjustment, I wonder what sort of timeline you think it might be before it might be included?
There are no set dates for when this might be available, and as these processes are recreated throughout the plugin, for each PayPal process separately, it’s a bit more of an issue to add than it may seem. My personal estimate would be mid-2013, when we are hoping to release the next major version of s2Member®.
|
OK, thanks, I will look at editing the shortcode for now.
Cheers
|