Created
December 11, 2024 05:44
-
-
Save andrewlimaza/d9419b696c306f6455d03446d3fc955c to your computer and use it in GitHub Desktop.
Show order/invoice status in PMPro PDF
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 | |
/** | |
* Add custom variables to PDF template editor to show some more order information. | |
* To add this code to your site, please visit - https://yoohooplugins.com/customize-wordpress/ | |
*/ | |
function my_pmpro_pdf_status_details( $data_array, $user, $order_data ) { | |
$data_array['{{order_status}}'] = esc_html( $order_data->status ); | |
return $data_array; | |
} | |
add_filter( 'pmpro_pdf_invoice_custom_variables', 'my_pmpro_pdf_status_details', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment