Home / Archive / MemberPress: Set UK Transactions VAT to 0
Duplicate Snippet

Embed Snippet on Your Site

MemberPress: Set UK Transactions VAT to 0

Once the VAT option is enabled at Dashboard > MemberPress > Settings > Taxes, MemberPress will apply VAT for all related countries.

This code snippet will set the VAT for transactions from the United Kingdom to 0%, thus excluding transactions from the United Kingdom from VAT calculations.

Code Preview
php
<?php
function mepr_cust_uk_vat( $vat_countries ) {
  if( isset( $vat_countries ) ) {
    $gb = $vat_countries['GB'];
    if ( isset( $gb ) ) {
      $gb['rate'] = 0;
      $vat_countries['GB'] = $gb;
    }
  }
  return $vat_countries;
}
add_filter( 'mepr-vat-countries', 'mepr_cust_uk_vat' );

Comments

Add a Comment