MemberPress: Override VAT Tax for the UK
add_filter(‘mepr-vat-countries’, function($countries) { unset($countries[‘GB’]); return $countries; });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘mepr-vat-countries’, function($countries) { unset($countries[‘GB’]); return $countries; });Continue reading
function mepr_cust_no_vat_to_taxjar( $should_send, $event ) { $transaction = $event->get_data(); if ( strpos( $transaction->tax_desc, __( ‘VAT’, ‘memberpress’ ) ) !== false ) { $should_send = false; } return $should_send; } add_filter( ‘mepr_taxjar_should_send_txn’, ‘mepr_cust_no_vat_to_taxjar’, 10, 2 );Continue reading
function change_vat_customer_type_label() { ?>Continue reading
add_action(‘mepr_stripe_create_customer_args’, function ($args, $usr) { $vat = sanitize_text_field($_REQUEST[‘mepr_vat_number’]); //Check one more time to make sure we have a vat number if (isset($vat) && !empty($vat)) { $tax_id = array( “type” => “eu_vat”, //Replace the “eu_vat” value with the predefined value of…Continue reading
function mepr_cust_limit_eu_signups( $errors ) { $usr_country = sanitize_text_field( $_POST[‘mepr-address-country’] ); $countries = require( MEPR_DATA_PATH.’/taxes/vat_countries.php’ ); //If EU country, but not GB, and no vat number entered, throw error if( array_key_exists( $usr_country, $countries ) && ‘GB’ != $usr_country && !isset( $_POST[‘mepr-vat-number’]…Continue reading
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’ );Continue reading
// Add 16% VAT to vendor commission add_filter( ‘wcv_process_commission’, ‘my_wcv_commission_rate’, 10, 5 ); add_filter( ‘wcv_commission_rate’, ‘my_wcv_commission_rate’, 10, 5 ); function my_wcv_commission_rate( $commission, $product_id, $product_price, $order, $qty ) { $vat_fee = 0.16; $marketplace_split = $product_price – $commission; $vat = $marketplace_split *…Continue reading