Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created January 23, 2014 20:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save strangerstudios/8585739 to your computer and use it in GitHub Desktop.
Save strangerstudios/8585739 to your computer and use it in GitHub Desktop.
Add a !!todaysdate!! variable for use in Paid Memberships Pro email templates. Add this to your active theme's functions.php or a custom plugin and then include !!todaysdate!! in your email templates.
/*
Adds !!todaysdate!! as an available variable for use in Paid Memberships Pro emails.
Notice the array key does not include the !!s
*/
function my_pmpro_email_data($data, $email)
{
$data['todaysdate'] = date(get_option("date_format"));
return $data;
}
add_filter("pmpro_email_data", "my_pmpro_email_data", 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment