Hooks and filters reference
Updated September 14, 2026
These are the filters and actions Tax Exemption for WooCommerce exposes for customisation. Add them in a site-specific plugin or your child theme’s functions.php. Hooks marked PRO only exist when the premium files are loaded, so guard against their absence if your code has to run on both builds.
Eligibility filters
tefw_is_user_enabled— final say on whether the current customer may claim exemption.tefw_is_role_enabled— whether the current customer’s role permits access to the exemption form.tefw_should_filter_product_tax_class— whether the exempt tax class may be substituted on this request. Returning false leaves tax classes untouched.tefw_customer_is_exempt_for_display(PRO) — whether this customer sees ex-tax prices while browsing. Receives the user ID as a second argument.
// Block exemption for anyone whose account is under a week old.
add_filter( 'tefw_is_user_enabled', function ( $is_exempt ) {
if ( ! $is_exempt || ! is_user_logged_in() ) {
return $is_exempt;
}
$user = wp_get_current_user();
if ( strtotime( $user->user_registered ) > strtotime( '-7 days' ) ) {
return false;
}
return $is_exempt;
} );
Registration number filters
tefw_regnum_types— the array of number types offered, keyed by type slug. The result is cached for the rest of the request, so attach this onplugins_loadedor earlier, never on a later runtime hook.tefw_regnum_validate— the verification result. Receives the result array, the type slug, the number as entered, and a context array. Use this to plug in a register the plugin does not support.tefw_regnum_http_timeout(PRO) — seconds to wait for a register. Defaults to 8. Kept short deliberately: this runs while a customer waits, and a fast “could not check” beats a slow answer.tefw_regnum_rate_limit(PRO) — checks allowed per customer or IP within the throttle window. Defaults to 30.
Expiry filters (PRO)
tefw_expired_email_max_age_days— how stale a lapsed exemption may be and still trigger the one-off “expired” email. Defaults to 30. Without this bound, switching the feature on would email everyone who has ever let an exemption lapse.tefw_expiry_digest_max_rows— rows listed per table in the admin digest email. Defaults to 100.
Other filters
tefw_certificate_user_can_view— whether the current visitor may view a certificate. Receives the boolean and the stored file name.tefw_guest_scan_limit— how many guest orders the Guest Customers list scans in one go. Defaults to 2000. Raise it with care; the bound exists to stop a long order history exhausting memory.tefw_docs_urlandtefw_support_url— the links in the admin header bar.
Actions
tefw_before_fieldsandtefw_after_fields— render your own markup around the exemption fields.after_tefw_save_form_submit— fires after a customer submits the exemption form.after_update_tefw_exempt_status— fires when a customer’s status changes. The place to hook a CRM sync or an audit log.tefw_regnum_saved— fires when a registration number is stored.
Scheduled events
tefw_hook_expiry_scan(PRO) — daily. Sends reminder and expired emails and reconciles statuses against expiration dates.tefw_hook_clear_temp_files(PRO) — daily. Clears staged certificate uploads not attached to a user or order.
Both are cleared when the plugin is deactivated.
Shortcodes
[tefw_exemption_form]— the full exemption form.[tefw_price_toggle](PRO) — the inc/ex tax price toggle.


