Skip to content

Instantly share code, notes, and snippets.

@goliver79
Created April 1, 2020 20:13
Show Gist options
  • Save goliver79/af86828b439fb698d15d44351fdbee8d to your computer and use it in GitHub Desktop.
Save goliver79/af86828b439fb698d15d44351fdbee8d to your computer and use it in GitHub Desktop.
Woocommerce add vat message after price
<?php
if ( !class_exists( 'VATMessage' ) ) {
class VATMessage {
function activate() {
add_filter( 'woocommerce_get_price_html', array( $this, 'vat_message' ) );
}
function vat_message( $price ) {
$vat = ' <span class="vat-info">' . __( '(VAT not included)', 'logopedicum' ) . '</span>';
return $price . $vat;
}
}
$vat_message = new VATMessage();
$vat_message->activate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment