Forked from strangerstudios/my_pmpro_email_data.php
Created
October 30, 2020 14:50
-
-
Save jsakhil/b9437f2749001ded7ed95df65262c6b0 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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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