Created
January 14, 2020 15:59
-
-
Save dancameron/e05cc939819e60c495dc91a4b1bb40d3 to your computer and use it in GitHub Desktop.
Slate Compatibility with Client VAT
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 // don't include this line in your functions.php, since it already starts with it. | |
remove_action( 'si_document_vcards', array( 'Woo_Tools', 'add_vat_number_to_doc' ) ); | |
remove_action( 'si_document_client_addy', array( 'SI_Hearts_EU', 'maybe_add_vat' ) ); | |
function add_vat_below_address( $address ) { | |
ob_start(); | |
SI_Hearts_EU::maybe_add_vat(); | |
$vat .= ob_get_clean(); | |
error_log( 'vat: ' . print_r( $vat, true ) ); | |
return $address . $vat; | |
} | |
add_filter( 'si_client_address', 'add_vat_below_address' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment