Skip to content

Instantly share code, notes, and snippets.

@WPprodigy
Created January 26, 2017 23:42
Show Gist options
  • Save WPprodigy/c5facac8e419edd5607f7a2c770d68e5 to your computer and use it in GitHub Desktop.
Save WPprodigy/c5facac8e419edd5607f7a2c770d68e5 to your computer and use it in GitHub Desktop.
Add billing phone and email to PIP invoice
function wc_ninja_add_to_billing_address( $formatted_billing_address, $type, $order ) {
if ( $order->billing_phone ) {
$formatted_billing_address .= "<br>" . $order->billing_phone;
}
if ( $order->billing_email ) {
$formatted_billing_address .= "<br>" . $order->billing_email;
}
return $formatted_billing_address;
}
add_filter( 'wc_pip_billing_address', 'wc_ninja_add_to_billing_address', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment