Created
February 26, 2018 11:16
-
-
Save ChromeOrange/c611c582337331522fab2a571f590789 to your computer and use it in GitHub Desktop.
Add billing field to Billing section, eg mobile number.
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
// Add billing field to Billing section, eg mobile number. | |
// Uses a placeholder [[PDFBILLINGMOBILE]] in the template file | |
add_filter( 'pdf_content_additional_content', 'custom_pdf_content_additional_content', 10, 2 ); | |
function custom_pdf_content_additional_content( $content, $order_id ) { | |
$content = str_replace( '[[PDFBILLINGMOBILE]]', get_post_meta( $order_id,'mobile',TRUE ), $content ); | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment