Developers

Shortcodes, blocks, template overrides, hooks and webhooks. All hooks and functions use the blraq prefix.

Shortcodes

ShortcodeOutput
[blraq_quote]The quote list and request form — same as the Request a Quote block. Place it on the page selected as Quote page.
[blraq_quote_link label="Quote" show_count="yes"]A link to the quote page. label sets the text (default "Quote"); show_count adds the number of products in the list (yes / no).
[blraq_button id="123"]An "Add to quote" button for product 123. Without id it uses the current product.

Blocks

BlockNameOptions
Request a Quotebrainlessitc-request-product-quote-for-woocommerce/quoteQuote list and request form. Supports wide / full alignment.
Quote List Linkbrainlessitc-request-product-quote-for-woocommerce/quote-linklabel, showCount, plus text color, background color and font size.

"Add to quote" buttons are added automatically to the WooCommerce Add to Cart Form, Add to Cart with Options and Product Button blocks (used by Product Collection), and to classic templates.

Template overrides

Copy a template from the plugin's templates/ folder into your theme, keeping the sub-folder, and edit the copy:

wp-content/plugins/brainlessitc-request-product-quote-for-woocommerce/templates/quote/form.php
→ wp-content/themes/your-theme/brainlessitc-request-product-quote-for-woocommerce/quote/form.php

Pro templates are overridden in the same theme folder.

TemplateUsed for
quote/basket.phpThe quote list on the quote page
quote/form.phpThe request form
quote/empty.phpEmpty quote list
quote/login-required.phpShown to guests when guest requests are off
quote/received.phpConfirmation after sending
emails/admin-new-quote.php, customer-quote-received.php, customer-quote-reply.phpHTML emails (plain-text versions in emails/plain/)
emails/quote-items.php, emails/quote-details.phpProducts table and customer details used in emails and pages
quote/proposal.php PROCustomer view of a proposal
myaccount/quotes.php PROMy Account › Quotes list
pdf/quote.php PROPDF quote (rendered by Dompdf — keep to tables and inline CSS)
emails/customer-proposal.php, customer-reminder.php, admin-quote-decision.php PROPro emails (plain versions in emails/plain/)

Helper functions

FunctionReturns
blraq()The plugin instance (services such as ->settings, ->quotes, ->basket, ->products).
blraq_get_quote( $id )A Quote object, or null.
blraq_get_setting( $key, $fallback = null )A setting value, e.g. blraq_get_setting( 'hide_price' ) → 'yes' / 'no'.
blraq_get_quote_page_url()URL of the quote page.
blraq_is_quote_page()Whether the current request is the quote page.
blraq_get_template( $name, $args )Loads a template (theme overrides first).

Useful Quote methods: get_id(), get_number(), get_status(), get_status_label(), get_customer_name(), get_customer_email(), get_items(), get_form_data(), get_field( $key ), get_total(), get_meta( $key ) and get_admin_url().

Examples

Add these snippets to a small custom plugin or with a code-snippets plugin.

Let shop managers without full WooCommerce rights manage quotes

add_filter( 'blraq_manage_capability', function () {
    return 'edit_shop_orders'; // Default: manage_woocommerce.
} );

No quotes for one category

add_filter( 'blraq_is_product_quotable', function ( $quotable, $product ) {
    $id = $product->get_parent_id() ? $product->get_parent_id() : $product->get_id();
    if ( has_term( 'gift-cards', 'product_cat', $id ) ) {
        return false;
    }
    return $quotable;
}, 10, 2 );

Add a "VAT number" field to the form

add_filter( 'blraq_form_fields', function ( $fields ) {
    $fields['vat_number'] = array(
        'type'     => 'text',
        'label'    => __( 'VAT number', 'my-textdomain' ),
        'required' => false,
        'class'    => array( 'form-row-wide' ),
        'priority' => 55, // Company is 50, Message 60.
    );
    return $fields;
} );

The value is sanitized, validated and stored with the quote like the built-in fields, and shown on the quote screen and in emails.

Send new requests to your CRM

add_action( 'blraq_quote_created', function ( $quote_id, $quote ) {
    wp_remote_post( 'https://crm.example.com/api/leads', array(
        'body' => array(
            'name'  => $quote->get_customer_name(),
            'email' => $quote->get_customer_email(),
            'quote' => $quote->get_number(),
        ),
    ) );
}, 10, 2 );

Prefix quote numbers

add_filter( 'blraq_quote_number', function ( $number, $quote ) {
    return 'Q-' . str_pad( $number, 5, '0', STR_PAD_LEFT ); // Q-00058
}, 10, 2 );

React to status changes

add_action( 'blraq_quote_status_changed', function ( $quote, $old_status, $new_status ) {
    if ( 'accepted' === $new_status ) {
        // e.g. notify your sales team.
    }
}, 10, 3 );
// Or listen to one status only: blraq_quote_status_{status}, e.g. blraq_quote_status_accepted ( $quote, $old_status ).

Actions

ActionArgumentsFires when
blraq_loaded$pluginThe plugin has booted.
blraq_added_to_basket$key, $product, $quantityA product was added to a quote list.
blraq_basket_updated$basketThe quote list changed.
blraq_before_create_quote$quote, $basketBefore a submitted request is saved.
blraq_quote_created$quote_id, $quoteA new quote request was saved.
blraq_before_save_quote / blraq_quote_saved$quote, $is_newBefore / after any quote is saved.
blraq_quote_status_changed$quote, $old_status, $new_statusThe status changed.
blraq_quote_status_{status}$quote, $old_statusThe quote moved to {status}.
blraq_quote_note_added$note_id, $quote_id, $typeA note was added ($type: private, customer, incoming or system).
blraq_customer_reply_sent$sent, $quoteA reply email was attempted.
blraq_before_delete_quote / blraq_quote_deleted$quote / $idBefore / after a quote is deleted.
blraq_validate_submission$errors, $posted, $dataValidate the whole request; add errors to the WP_Error. $posted is already sanitized.
blraq_before_form_fields / blraq_after_form_fields—Print extra markup around the form fields.
blraq_basket_item_after_name$item, $keyUnder a product name in the quote list.
blraq_basket_form_updated$item_metaThe quote list form was posted; extra item fields (sanitized) keyed by item key.
blraq_ajax_update_item$key, $metaA quote list item was updated via AJAX; $meta is sanitized.
blraq_after_quote_received$quoteBelow the confirmation after sending.
blraq_quote_item_meta$item, $quote, $sent_to_adminUnder a product in quote tables (emails, pages).
blraq_admin_quote_main / _sidebar / _actions / _info$quoteAdd boxes and controls to the quote screen.
blraq_admin_before_save_quote / blraq_admin_save_quote$quoteThe quote screen is being saved (nonce and capability already verified). Read and sanitize your own fields.
blraq_product_panel / blraq_save_product_fields— / $productExtend the product's Request a Quote tab.
blraq_settings_saved$tab, $updatesA settings tab was saved.
blraq_quote_page_override—Print replacement quote-page content when blraq_has_quote_page_override returns true. Escape everything you print.

Filters

FilterArgumentsFilters
blraq_is_product_quotable$quotable, $productWhether a product can be quoted.
blraq_hide_price$hide, $productWhether the price is hidden.
blraq_hide_add_to_cart$hide, $productWhether Add to cart is hidden and blocked.
blraq_price_replacement_text$text, $productText shown instead of a hidden price.
blraq_allow_out_of_stock$allow, $productAllow quotes for out-of-stock products.
blraq_supported_product_types$typesProduct types that can be quoted (default simple, variable, variation).
blraq_validate_add_to_basket$valid, $product, $quantityAllow or refuse adding to the quote list (return WP_Error to show a message).
blraq_basket_item_quantity / blraq_basket_item_meta$value, $productQuantity / extra data of a new list item.
blraq_button_label$label, $product, $contextButton text ($context: single or loop).
blraq_button_classes$classes, $contextButton CSS classes.
blraq_added_message$html, $productMessage after adding a product (non-JS).
blraq_form_fields$fieldsRequest form fields (see example).
blraq_form_field_args$args, $key, $valueArguments passed to woocommerce_form_field().
blraq_form_default_values$valuesPre-filled values (logged-in customers get their billing details).
blraq_validate_field$valid, $value, $fieldValidate one field; return WP_Error to reject.
blraq_submission_data$data, $postedClean data stored with the quote.
blraq_submit_button_text$textSubmit button label.
blraq_submit_redirect$url, $quoteWhere customers go after sending.
blraq_min_submit_seconds$secondsMinimum time between loading and sending the form (spam check).
blraq_client_ip$ipVisitor IP used for rate limiting (e.g. behind a proxy).
blraq_quote_statuses$statusesRegister or relabel statuses (key => [ label, color ]).
blraq_quote_number$number, $quoteDisplayed quote number.
blraq_display_item_price$price, $item, $quote, $sent_to_adminUnit price shown in quote tables (null hides it).
blraq_quote_totals_rows$rows, $quote, $total, $sent_to_adminTotals rows below quote tables.
blraq_quote_page_url$urlURL of the quote page.
blraq_has_quote_page_override$overrideReturn true to replace the quote page content (print it on blraq_quote_page_override).
blraq_manage_capability$capCapability to manage quotes and settings (default manage_woocommerce).
blraq_list_table_columns / blraq_list_table_column_{name} / blraq_list_table_row_actions…Customize the quotes list.
blraq_settings_schema$schema, $settingsAdd settings tabs, sections and fields.
blraq_default_settings / blraq_setting_{key}$defaults / $value, $keyDefault values / a single setting value.
blraq_template_default_path$path, $template_nameFolder templates are loaded from.
blraq_upgrade_url$url"Get Pro" link target.

Pro hooks PRO

HookArgumentsPurpose
blraq_pro_loaded (action)$proPro has booted (with an active license).
blraq_pro_proposal_sent (action)$quote, $sentA proposal email was sent.
blraq_pro_order_created (action)$order, $quoteA quote was turned into an order.
blraq_pro_order_from_quote (filter)$order, $quoteAdjust the order before it is saved.
blraq_pro_proposal_totals (filter)$totals, $quoteProposal subtotal, discount, shipping, fee and total.
blraq_pro_proposal_visible_statuses (filter)$statusesStatuses in which customers can see proposal prices.
blraq_pro_pdf_filename (filter)$name, $quotePDF file name without .pdf (default quote-{number}).
blraq_pro_webhook_payload (filter)$payload, $event, $quoteChange the webhook JSON.

Webhooks PRO

Configure delivery URLs and a signing secret in Settings › Integrations. Events are delivered in the background as an HTTP POST with a JSON body.

EventWhen
quote.createdA new quote request was submitted.
quote.status_changedA quote changed status.

Headers

Payload

{
  "event": "quote.created",
  "site": "https://example.com/",
  "quote": {
    "id": 58,
    "number": "58",
    "status": "new",
    "status_label": "New",
    "currency": "USD",
    "total": 1080,
    "customer": { "id": 0, "name": "Sofia Martinez", "email": "sofia@example.com" },
    "fields": {
      "company": { "label": "Company", "value": "Casa Boutique" },
      "message": { "label": "Message", "value": "Wholesale pricing for 3 products." }
    },
    "items": [
      {
        "product_id": 21, "variation_id": 0, "name": "Shoes", "sku": "woo-fashion-shoes",
        "quantity": 30, "price": 18, "offered_price": null, "attributes": {}
      }
    ],
    "order_id": 0,
    "created_at": "2026-10-01T06:02:00+00:00",
    "expires_at": null,
    "admin_url": "https://example.com/wp-admin/admin.php?page=blraq-quotes&quote=58"
  },
  "sent_at": "2026-10-01T06:02:05+00:00"
}

Verify the signature (PHP)

$body      = file_get_contents( 'php://input' );
$expected  = base64_encode( hash_hmac( 'sha256', $body, 'your-signing-secret', true ) );
$signature = isset( $_SERVER['HTTP_X_BLRAQ_SIGNATURE'] ) ? $_SERVER['HTTP_X_BLRAQ_SIGNATURE'] : '';

if ( ! hash_equals( $expected, $signature ) ) {
    http_response_code( 401 );
    exit;
}
$event = json_decode( $body, true );

Stored data