Created
January 26, 2017 23:42
-
-
Save WPprodigy/c5facac8e419edd5607f7a2c770d68e5 to your computer and use it in GitHub Desktop.
Add billing phone and email to PIP invoice
This file contains hidden or 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
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