Created
October 19, 2022 23:38
-
-
Save rickalday/c7d20cad04b036821bf382699abf02b3 to your computer and use it in GitHub Desktop.
PDF Complete Date Tag
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
<?php | |
function give_add_complete_date_pdf_tag( $template_content, $args ) { | |
//$completedate = $args['payment_meta']['_give_completed_date']; | |
$completedate = date_i18n( get_option( 'date_format' ), strtotime( $args['payment_meta']['_give_completed_date'] ) ); | |
$template_content = str_replace( '{completedate}', $completedate, $template_content ); | |
return $template_content; | |
} | |
add_filter( 'give_pdf_compiled_template_content', 'give_add_complete_date_pdf_tag', 999, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment