Cartnorm B2B 0.3.2 has 18 actions and 40 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Cartnorm B2B fires an action
add_action( 'cartnorm_b2b_application_approved', function( $user_id, $group ) {
// Your code runs here.
}, 10, 2 );
// Change a value Cartnorm B2B is about to use
add_filter( 'cartnorm_b2b_add_to_quote_label', function( $_ ) {
// Change $_ here.
return $_;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter the label of the "Add to quote" button. */ apply_filters( 'cartnorm_b2b_add_to_quote_label', __( 'Add to quote', 'cartnorm-b2b' ) ); -
/** * Fires after a wholesale application was approved. */ do_action( 'cartnorm_b2b_application_approved', $user_id, $group ); -
/** * Fires after a wholesale application was rejected. */ do_action( 'cartnorm_b2b_application_rejected', $user_id ); -
/** * Fires after a wholesale application was stored. */ do_action( 'cartnorm_b2b_application_submitted', $user_id, $application, $created ); -
/** * Whether an application is approved automatically. Default: only when the * setting is "automatic" and VIES confirmed the VAT ID. */ apply_filters( 'cartnorm_b2b_auto_approve', 'auto' === Settings::get( 'reg_approval' ) && $vies && Vies::VALID === $vies['status'], $user_id, $application ); -
/** * Filter the detected page cache plugins. */ apply_filters( 'cartnorm_b2b_cache_plugins', $plugins ); -
/** * Filter whether the current user may change the customer group of a user. */ apply_filters( 'cartnorm_b2b_can_assign_group', $allowed, (int) $user_id ); -
/** * Filter the order rule messages of a cart. Any message prevents checkout. */ apply_filters( 'cartnorm_b2b_cart_rule_messages', $messages, $cart, $slug ); -
/** * Filter the notice type of order rule messages in the classic cart and * checkout. */ apply_filters( 'cartnorm_b2b_classic_notice_type', $type ); -
/** * Filter a fixed group price or quantity price converted to the current * currency. Currency switchers other than WCML can hook in here. */ apply_filters( 'cartnorm_b2b_convert_price', $converted, $amount ); -
/** * Fires in the quote email after the accept button (for add-ons). */ do_action( 'cartnorm_b2b_email_quote_answered_after_button', $quote_id, $email ); -
/** * Fires in the plain-text quote email after the accept link (for add-ons). */ do_action( 'cartnorm_b2b_email_quote_answered_after_button_plain', $quote_id, $email ); -
/** * Filter the order rules (minimum order value and minimum total quantity) of a * group. */ apply_filters( 'cartnorm_b2b_group_order_rules', $rules, $slug ); -
/** * Filter the group price of a product before quantity tiers. */ apply_filters( 'cartnorm_b2b_group_price', $price, $product, $group, $source ); -
/** * Filter whether prices are hidden for the current visitor. */ apply_filters( 'cartnorm_b2b_hide_prices', $hidden, $audience ); -
/** * Filter whether the current page belongs to the restricted catalog. */ apply_filters( 'cartnorm_b2b_is_catalog_request', $catalog ); -
/** * Filter whether an order line is treated as a service (reverse charge) or * goods (intra-Community supply). */ apply_filters( 'cartnorm_b2b_is_service', $service, $item ); -
/** * Filter whether the current Store API request is a checkout request (order * rules block it). */ apply_filters( 'cartnorm_b2b_is_store_api_checkout', $checkout, self::$route ); -
/** * Filter whether to keep all data on uninstall (e.g. while switching to Pro). */ apply_filters( 'cartnorm_b2b_keep_data_on_uninstall', false ); -
/** * Filter the legal note printed for tax-exempt intra-Community supplies of * goods. */ apply_filters( 'cartnorm_b2b_legal_note_goods', $note, $locale ); -
/** * Filter the legal note printed for reverse-charge services. */ apply_filters( 'cartnorm_b2b_legal_note_services', $note, $locale ); -
/** * Filter the legal notes stored on the order and printed on order details and * emails. */ apply_filters( 'cartnorm_b2b_legal_notes', $notes, $treatment, $order, $decision ); -
/** * Filter the legal invoice phrases. Keys are language codes (ISO 639-1, e.g. * "de") or full locales (e.g. "de_AT", which then win over "de"); values are * array( 'goods' => …, 'services' => … ). */ apply_filters( 'cartnorm_b2b_legal_phrases', self::builtin() ); -
/** * Fires after Cartnorm B2B is loaded. Add-ons (such as Pro) hook in here. */ do_action( 'cartnorm_b2b_loaded' ); -
/** * Filter the cart amount compared with the minimum order value. */ apply_filters( 'cartnorm_b2b_min_order_cart_amount', $amount, $cart, $incl ); -
/** * Whether a group price may never be higher than the current normal (or sale) * price. */ apply_filters( 'cartnorm_b2b_never_above_retail', true, $product ); -
/** * Filter the language used for the legal phrases of an order. */ apply_filters( 'cartnorm_b2b_order_language', $locale, $order ); -
/** * Filter whether the current page is sent as private / not cacheable. */ apply_filters( 'cartnorm_b2b_private_page', $private ); -
/** * Filter the quantity rule of a product for a group. */ apply_filters( 'cartnorm_b2b_product_quantity_rule', $rule, $product, $slug ); -
/** * Fires after a quote answer was sent to the customer. Add-ons (e.g. a PDF * with a payment link) hook in here. */ do_action( 'cartnorm_b2b_quote_after_answer', $id, (bool) $sent ); -
/** * Fires after a quote was converted to an order. */ do_action( 'cartnorm_b2b_quote_converted', $id, $order ); -
/** * Fires after a quote request was stored. */ do_action( 'cartnorm_b2b_quote_created', $id ); -
/** * Filter the "Add to quote" mode for the current visitor. */ apply_filters( 'cartnorm_b2b_quote_mode', $mode, $audience ); -
/** * Fires after the status of a quote changed. */ do_action( 'cartnorm_b2b_quote_status_changed', (int) $id, $status ); -
/** * Filter how many submissions of a form one IP address may send per hour. */ apply_filters( 'cartnorm_b2b_rate_limit', 5, $action ); -
/** * Filter the validation errors of a wholesale application. */ apply_filters( 'cartnorm_b2b_registration_errors', $errors, $f, $user_id ); -
/** * Filter whether the country of the VAT ID must match the destination country. */ apply_filters( 'cartnorm_b2b_require_matching_country', true ); -
/** * Filter the effective settings. */ apply_filters( 'cartnorm_b2b_settings', self::$cache ); -
/** * Filter whether to show our own "excl. VAT" suffix. Default: yes, unless * Germanized is active; Germanized prints its own tax notice, which already * says "excl. VAT" for these groups because it reads the same display option. * A shop-wide suffix such as "incl. VAT" is removed either way. */ apply_filters( 'cartnorm_b2b_show_excl_suffix', ! Compat::has_germanized() ); -
/** * Filter whether the current visitor is kept out of a "B2B only" shop (no * prices, cannot buy). */ apply_filters( 'cartnorm_b2b_store_locked', $locked, get_current_user_id() ); -
/** * Filter the notice shown to visitors of a "B2B only" shop who cannot see * prices. */ apply_filters( 'cartnorm_b2b_store_notice', $text ); -
/** * Filter the quantity used to pick a quantity tier for a cart line. Default: * the total quantity of the same product or variation in the cart. */ apply_filters( 'cartnorm_b2b_tier_quantity', $qty[ $key ], $item, $cart_key ); -
/** * Filter the units of the simple unit price. */ apply_filters( 'cartnorm_b2b_units', $units ); -
/** * Filter the customer group of a user. Must return an existing group slug or * "retail". */ apply_filters( 'cartnorm_b2b_user_group', $slug, $user_id ); -
/** * Filter the VAT decision. */ apply_filters( 'cartnorm_b2b_vat_decision', $decision, $raw, $country ); -
/** * Filter whether the VAT ID field is required, optional or hidden for the * current visitor. */ apply_filters( 'cartnorm_b2b_vat_field_mode', $mode, Groups::current() ); -
/** * Fires after a pending VAT ID was re-checked. */ do_action( 'cartnorm_b2b_vat_rechecked', $order, $result ); -
/** * Fires after VAT evidence was stored on an order (before the order is saved). */ do_action( 'cartnorm_b2b_vat_recorded', $order, $decision ); -
/** * Filter how long a VIES result is cached, in seconds. */ apply_filters( 'cartnorm_b2b_vies_cache_ttl', $ttl, $result ); -
/** * Fires after a VAT ID was checked in VIES (not for cached results). */ do_action( 'cartnorm_b2b_vies_checked', $result, $prefix, $number ); -
/** * Filter the VIES request timeout in seconds. */ apply_filters( 'cartnorm_b2b_vies_timeout', 10 ); -
do_action( 'woocommerce_email_header', $email_heading, $email ); -
do_action( 'litespeed_control_set_nocache', 'Cartnorm B2B: B2B prices' ); -
apply_filters( 'wcml_raw_price_amount', $amount ); -
do_action( 'wpsc_add_cookie', self::COOKIE ); -
do_action( 'wpsc_delete_cookie', self::COOKIE );
Generated from Cartnorm B2B's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: