Created
January 6, 2015 06:16
-
-
Save amdrew/dbfaa238900fb31d7b47 to your computer and use it in GitHub Desktop.
Easy Digital Downloads - add a {ip_address} email tag
This file contains hidden or 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
<?php | |
/** | |
* Add a {ip_address} tag for use in either the purchase receipt email or admin notification emails | |
*/ | |
if ( function_exists( 'edd_add_email_tag' ) ) { | |
edd_add_email_tag( 'ip_address', 'Customer\'s IP Address', 'sumobi_edd_email_tag_ip_address' ); | |
} | |
/** | |
* The {ip_address} email tag | |
*/ | |
function sumobi_edd_email_tag_ip_address( $payment_id ) { | |
return edd_get_payment_user_ip( $payment_id ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment