Created
April 1, 2020 20:13
-
-
Save goliver79/af86828b439fb698d15d44351fdbee8d to your computer and use it in GitHub Desktop.
Woocommerce add vat message after price
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
<?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