Skip to content

Instantly share code, notes, and snippets.

@dancameron
Created January 14, 2020 15:59
Show Gist options
  • Save dancameron/e05cc939819e60c495dc91a4b1bb40d3 to your computer and use it in GitHub Desktop.
Save dancameron/e05cc939819e60c495dc91a4b1bb40d3 to your computer and use it in GitHub Desktop.
Slate Compatibility with Client VAT
<?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