Jason! Thanks very much for the fix. I'm sorry that I only caught wind of this today. I must have failed to check the "Notify me when a reply is posted" checkbox when posting and then failed again by not adding the thread to my RSS reader. You da man!
In the dashboard under "s2Member API / Notifications" -> "Signup Notifications" you advocate dynamic custom values using this example:
- Code: Select all
custom="www.example.com|<?php echo $_SERVER["REMOTE_ADDR"]; ?>"
Rather than include php code which could easily and inadvertently be sanitized by the WP editor (or enabling php-exec which seems dangerous), what about something like this?
- Code: Select all
custom="www.example.com|%%affiliate-cookie%%"
...in combination with a filter function like this:
- Code: Select all
function s2m-dynamic-form-custom-val($content) {
return str_replace('%%affiliate-cookie%%', $_COOKIE['affiliate_id'], $content)
}
add_filter('what-hook-is-this-jason', 's2m-dynamic-form-custom-val');
Does this seem like a reasonable approach? It feels like it might already even be possible assuming there is suitable 'what-hook-is-this-jason' equivalent, right?