WooCommerce Tax normally sends the store address from WooCommerce > Settings > General as the primary nexus address. Use the woocommerce_taxjar_nexus_address filter when a custom integration needs to change or remove that address before the tax request is sent.
Note:
This is a Developer level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customizations. We are unable to provide support for customizations under our Support Policy.
Change the nexus address
↑ Back to topThe filter receives the nexus-address array and the complete normalized request body. Return the modified array.
add_filter( 'woocommerce_taxjar_nexus_address', function( $nexus_address, $body ) {
$nexus_address['street'] = '123 Custom Street';
return $nexus_address;
}, 10, 2 );
The supported address keys are:
country: Two-letter country code. Required.state: State or province code. Required for United States addresses.zip: ZIP or postal code. Optional.city: City. Optional.street: Street address. Optional.
Remove the nexus address
↑ Back to topReturn false or an empty array to remove the nexus-address object. The tax request then uses the standard from_* address fields.
add_filter( 'woocommerce_taxjar_nexus_address', '__return_false' );
This filter changes data sent to the tax service; it does not determine your tax obligations. Confirm the intended address with a tax professional and test the result on a staging site.
Questions and support
↑ Back to topSomething missing from this documentation? Still have questions and need assistance?
- If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
- If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.