Skip to content

Instantly share code, notes, and snippets.

@sirjonathan
Created August 3, 2020 02:58
Show Gist options
  • Save sirjonathan/3b8cdedbfdc112050b5279f26753fe99 to your computer and use it in GitHub Desktop.
Save sirjonathan/3b8cdedbfdc112050b5279f26753fe99 to your computer and use it in GitHub Desktop.
Add ABN to PDF Invoices
/**
* Add PDF invoice information meta
*
* @param array $info Invoice info meta.
* @param BEWPI_Invoice $invoice Invoice object.
* @since 2.9.8
*
* @return array.
*/
function add_invoice_information_meta( $info, $invoice ) {
// Add ABN number, manually set.
$abn_number = '2232323';
if ( $abn_number ) {
$info['abn_number''] = array(
'title' => __( 'ABN:', 'woocommerce-pdf-invoices' ),
'value' => $abn_number,
);
}
return $info;
}
add_filter( 'wpi_invoice_information_meta', 'add_invoice_information_meta', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment