Skip to content

About

TackQuote B2B quoting plugin for WooCommerce: request-a-quote buttons, quote-only store mode, hide prices from guests, and wholesale pricing, synced with the TackQuote quoting platform.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TackQuote: Request a Quote & B2B Wholesale for WooCommerce

Part of the TackQuote integrations family. All platforms are listed on the TackQuote GitHub organization page: github.com/tackquote (TackQuote integrations index).

Add a Request a Quote button to your WooCommerce store and sync orders with your TackQuote B2B quoting account.

  • 🧾 "Add to Quote" and "Request a Quote" buttons on product pages, plus a floating quote list with "Checkout as Quote"
  • πŸ›’ More places to start a quote (product cards and the cart switch on at the store's first successful connection, unless already saved off; the quote page is yours to place): "Add to Quote" on product cards (shop pages and, since 1.12.0, block product grids such as Product Collection), "Request a quote for your cart" on the classic cart and inside the Cart block (above Proceed to checkout, through the Blocks Integration API), and a quote page via [tackquote_quote_page] with quantities, target prices and a message
  • πŸ“ The seller's own quote request form (since 1.12.0): the form designed in TackQuote replaces the built-in modal fields when the server lists quote-form; the built-in form stays otherwise
  • ⚑ Quick order (since 1.12.0): [tackquote_quick_order] and the "TackQuote quick order" block; SKUs matched in the store's own catalogue, then added to the cart (WooCommerce's own add-to-cart rules) or to the quote list
  • 🎯 Floating launcher settings β€” position, offsets, label, icon only, count, size, pages, hide on mobile; defaults match the 1.8 launcher
  • πŸ”’ Quote only per product (variations inherit, enforced in woocommerce_is_purchasable and the Store API) and a store-wide scope that keeps the cart for approved wholesale accounts only
  • πŸ’· B2B pricing β€” signed-in trade customers priced from their TackQuote price book, buyer group and quantity breaks, with an optional volume-pricing table
  • πŸ“¦ Order limits β€” minimum/maximum order quantities shown on the product page and enforced at the cart and checkout
  • 🏷️ Buyer group badge β€” tells a customer which pricing group they are on, so a discounted price does not read as an error
  • πŸ‘₯ Per buyer group (each off by default) β€” hide product categories (loops, search, blocks, Store API, related/up-sells; direct URL 404; not purchasable; removed from carts), free or percentage-off shipping applied after the group restrictions, and an optional tackquote_<code> WordPress role (read only, never drives pricing)
  • 🧭 TackQuote menu β€” top-level TackQuote menu with Dashboard (the TackQuote workspace) and Settings (Overview, Connection, Storefront, B2B pricing, Buyer groups, Forms, Order sync) under one tab bar; each tab saves only its own settings
  • πŸŽ›οΈ One source for each setting (since 1.13.0, servers listing store_settings + store_settings_write) β€” order sync, the four B2B switches and the wholesale form are kept in TackQuote and stay editable on the plugin's tabs (written through with PUT …/store-settings/from-plugin); buyer groups and forms are picked from TackQuote's lists; any switch can still be turned off for this store only
  • 🧾 Net terms at checkout (off by default) β€” payment method "Net terms (TackQuote)" (tackquote_net_terms, classic checkout and Checkout block) for buyers TackQuote has approved; the order goes on hold, never marked paid, and fails closed when TackQuote cannot confirm the buyer. Optional checkout PO number sent with the order
  • πŸ” Optional one-way order sync to TackQuote (on creation and status change), queued through Action Scheduler so it never runs inside checkout
  • πŸ”‘ Simple setup: press Connect with TackQuote, sign in and approve (no key to copy), or paste your TackQuote API key
  • 🌐 Storefront text bundled in German, Spanish, French, Italian, Japanese, Dutch and Brazilian Portuguese (languages/, generated from the shared TackQuote catalogue; see languages/README.md)
  • πŸ›‘οΈ HPOS- and Cart/Checkout-blocks-compatible; nonce, capability and rate-limit protected; removes its own options, transients, user and product meta and queued jobs on uninstall

See the == External services == and == Privacy == sections of readme.txt for exactly which fields are sent to TackQuote, when, and what the plugin stores locally. TackQuote's Terms of Service and Privacy Policy govern use of the service.

Screenshots

The same images and captions as the wordpress.org listing (files in .wordpress-org/, captions from == Screenshots == in readme.txt). Demo store content on Twenty Twenty-Five unless noted; features that need a TackQuote answer (prices, groups, limits, net terms, forms, quote checkout) were captured with demo server responses.

Screenshot 1
1. Add to Quote and Request a Quote sit beside Add to cart on the product page (Twenty Twenty-Five).
Screenshot 2
2. Product cards in the shop grid can carry an Add to Quote button.
Screenshot 3
3. The quote drawer lists the chosen products and quantities, with Checkout as Quote.
Screenshot 4
4. The quote page from the [tackquote_quote_page] shortcode takes target prices and a message, and the request form can carry attachments.
Screenshot 5
5. Quote-only mode shows "Price on request" in place of prices, and single products can be marked "Available on quote".
Screenshot 6
6. A signed-in buyer sees their account price, their buyer group badge and a volume pricing table.
Screenshot 7
7. Order limits show on the product page and are enforced in the cart and the Checkout block.
Screenshot 8
8. Buyers TackQuote has approved can pay on net terms at checkout and add a purchase order number.
Screenshot 9
9. The wholesale application form in My Account is the form you design in TackQuote, file fields included.
Screenshot 10
10. A checkout link from an accepted quote fills the cart at the quoted prices with the quantities locked.
Screenshot 11
11. Categories hidden per buyer group: a guest (left) does not see the trade range that a Tier 2 buyer (right) sees.
Screenshot 12
12. Storefront buttons in German from the bundled translations.
Screenshot 13
13. The Overview tab shows the connection, the storefront mode, order sync and every B2B switch.
Screenshot 14
14. The Styling section of the Storefront tab: use the theme's styles only, or pick an accent colour.
Screenshot 15
15. The Buyer groups tab keeps payment and shipping methods for the groups you tick.
Screenshot 16
16. With an accent colour set, the quote buttons blend into Twenty Twenty-Four.

Customising the look

The storefront controls take the active theme's buttons, fields, fonts and colours by default. Merchants can set an accent colour or "Use the theme's styles only" under TackQuote > Storefront > Styling, or override --tackquote-* CSS variables; developers can override the templates in templates/tackquote/ from yourtheme/woocommerce/tackquote/ and use the tackquote_* filters. Full reference: docs/CUSTOMISATION.md.

Installation

  1. Download the latest tackquote.zip from the Releases page (direct link: tackquote.zip), or build locally with bash bin/build.sh.

  2. In WP Admin go to Plugins β†’ Add New β†’ Upload Plugin and upload the ZIP.

  3. Activate the plugin.

  4. Go to TackQuote in the admin menu and open the Connection tab. Press Connect with TackQuote, sign in to TackQuote (or create an account) and approve; the plugin stores the key it receives and runs the connection test. Or paste your TackQuote API key (found in TackQuote under Settings β†’ Developer β†’ API Keys), save, then click Test TackQuote connection to verify. The Overview tab then shows the connection, storefront, order sync and B2B switches at a glance.

  5. (Since 1.12.0, needs a TackQuote server that offers it.) Right after Connect with TackQuote, or later with Allow catalogue and order sync on the Connection tab, WooCommerce's own approval screen opens ("TackQuote would like to connect to your store", Read/Write). Approve it and WooCommerce sends TackQuote a REST API key directly, so TackQuote can sync the catalogue, stock and categories, receive store webhooks (Flows) and write orders back. Deny it and the plugin keeps working as before.

    The key must carry the quotes:write scope. Test connection uses the unscoped ping route, so a key without it passes the test and then fails every real quote submission with a 403. Order sync additionally needs orders:write.

Updates

  • Installed from WordPress.org: WordPress updates it from WordPress.org as usual.
  • Installed from the zip (the website's Download button, releases/latest/download/tackquote.zip): from the next release that zip carries Update URI: https://github.com/tackquote/woocommerce, and includes/class-tack-release-updates.php answers WordPress's update_plugins_github.com check from the GitHub "latest" release, so WordPress offers each new release under Dashboard β†’ Updates. A zip installed before that release (folder tackquote/, no Update URI) is matched by WordPress.org on its slug and keeps receiving WordPress.org updates until it takes that release.
  • Two builds from one tree. TACKQUOTE_BUILD_TARGET=github (the default; scripts/package.sh, the GitHub release) adds the header and keeps the updater. TACKQUOTE_BUILD_TARGET=wporg (bin/wporg-sync.sh) removes both, because a WordPress.org-hosted plugin may not carry an updater or a foreign Update URI (Plugin Check plugin_updater_detected). bin/build.sh asserts each target's shape.
  • The settings page shows Update available when WordPress knows a newer version, or when TackQuote names one on its ping (latestPluginVersion).

Requirements

  • WordPress 6.4+
  • WooCommerce 8.0+
  • PHP 7.4+

What it calls

The plugin talks to your TackQuote account over HTTPS using your API key (Bearer + X-Api-Key). Configure the API URL in settings (default https://api.tackquote.com/v1). Endpoints used:

Purpose Method & path
Connection test GET /integrations/woocommerce/ping (/health only when ping answers 404: reachable, key not verified; 401/403 = key rejected). Also read at most daily from the storefront for the attachments capability
Quote request from product/cart POST /integrations/woocommerce/quote-requests (target prices as lineItems[].targetPrice when the ping lists attachments, else in the note; the seller-designed form's answers + formVersionId when the ping lists quote-form); since 1.13.0 customFields, the answers to the seller's own registration questions from registration-config, only the keys that policy lists; since 1.13.1 buyerExternalId, the signed-in shopper's numeric WordPress user ID, only when the ping lists requester_identity (never for a guest)
Seller-designed quote request form (1.12.0, only when the ping lists quote-form) GET /storefront/v1/quote-form?locale= (X-Api-Key only, scope storefront:read; cached five minutes per language). Without a designed form (versionId null) the built-in form is used
Order sync POST /integrations/woocommerce/order-sync
Store settings decided in TackQuote (since 1.13.0, only when the ping lists store_settings) GET /integrations/woocommerce/store-settings (on the ten-minute standing refresh, after its ping, never on a shopper's request; answers orderSync.push, features.{prices, orderLimits, buyerGroupBadge, taxExempt}, buyerGroups[{code,name}], wholesaleForms[{slug,name,isDefault}], defaultWholesaleFormSlug, updatedAt); POST /integrations/woocommerce/store-settings/seed (orderSync, features and the typed defaultWholesaleFormSlug or null, from the plugin's own options, only while updatedAt is null); PUT /integrations/woocommerce/store-settings/from-plugin (only with store_settings_write; a setting changed on the plugin's tabs, seller-route shape: orderSync {push, acknowledgePersonalData}, features {…}, defaultWholesaleFormSlug; one request per save; wpUserId, the acting WordPress user's numeric ID, only when the ping lists store_settings_actor)
B2B pricing (per buyer, per quantity) POST /storefront-pricing/resolve
Product-page price (the page's own product) GET /storefront/v1/wholesale-price
Quantity breaks GET /storefront/v1/quantity-breaks (falls back to probing /storefront-pricing/resolve)
Order limits GET /storefront/v1/order-limits (falls back to GET /storefront-b2b/order-limits)
Buyer group, tax exemption GET /storefront/v1/buyer-group (falls back to GET /storefront-b2b/buyer-group)
Wholesale application form GET /integrations/woocommerce/wholesale-form?slug=, POST /integrations/woocommerce/wholesale-form/submit?slug= (scope buyers:write)
Net-terms application POST /storefront/v1/credit-application (falls back to POST /integrations/woocommerce/credit-application; scope buyers:write)
Wholesale price gate (opt-in quote-only scope) and the "Wholesale account" My Account tab / wholesale shortcode (1.11.0: approved summary instead of the form) GET /storefront/v1/price-access (no fallback; the gate fails closed, the tab shows the form on any failure; one answer per customer reused for up to five minutes, shared by both)
Net terms at checkout (opt-in payment method) and on the "Net terms" My Account tab GET /storefront/v1/net-terms (no fallback; fails closed; one answer per customer reused for up to a minute, shared by checkout and the tab; re-read when the order is placed)
Attachments (only when the server's ping lists attachments) POST /storefront/v1/quote-upload?name= (quote files; opt-in switch; scope quotes:write), POST /storefront/v1/wholesale-upload?form=&field=&name= (wholesale files, signed-in only; scope buyers:write), raw application/octet-stream, X-Api-Key only; then uploadIds (+ a guest's uploadToken) on the quote request, or POST /storefront/v1/wholesale-signup/<slug> for an application with files
Connect with TackQuote (only when an administrator presses the button; no key yet, so none is sent) POST /woocommerce-connect/requests (site, admin and return address, site name, versions, locale, signed state, S256 codeChallenge) answers requestId + connectUrl for the browser; the browser comes back to wp-admin/admin-post.php?action=tackquote_connect_return with code + state; then POST /woocommerce-connect/exchange (code, codeVerifier, siteUrl) answers the API key once
Revoke a Connect key (Remove saved API key, Connect keys only) POST /integrations/woocommerce/plugin-key/revoke with that key (204)
TackQuote β†’ Dashboard, the dashboard inside WordPress admin (since 1.12.0, under WooCommerce until 1.13.0; only when the server's ping lists embedded_dashboard) POST /integrations/woocommerce/embed/open (wpUserId, the WordPress user's own 64-hex wpUserSecret from their user meta, purpose frame/tab) answers a one-time login code + frame ticket for a linked user (framed as https://app.tackquote.com/woocommerce/app?frame=…#code=…) or unlinked; POST /integrations/woocommerce/embed/claim (code from TackQuote β†’ Integrations β†’ WooCommerce β†’ Link a WordPress login, wpUserId, wpUserLogin, wpUserSecret) links that WordPress user; POST /integrations/woocommerce/embed/unlink (wpUserId, wpUserSecret) removes it. Use one API key per WordPress site: links are per store connection
Accepted quote to store checkout (?tackquote_checkout= link) GET /integrations/woocommerce/quote-checkout/<token> (once per token, never retried; sends only the token; the order then syncs with tackQuoteRef)

Every request carries X-TackQuote-Plugin-Version and X-TackQuote-Site-Url (the store's home_url()), and none follows an HTTP redirect (the key is never re-sent elsewhere). /storefront/v1/* calls send the key in X-Api-Key only (that route refuses a second credential), with the signed-in customer as buyerEmail + buyerExternalId (the WordPress user id; never for a guest). The read-only lookups need no scope beyond a valid key; the two application forms need buyers:write.

What happens when TackQuote cannot be reached

Every one of the B2B lookups except the opt-in wholesale price gate and the opt-in net-terms payment method fails open, and that is a deliberate design decision rather than an oversight. The price gate and net terms fail closed because their whole purpose is to keep something (the cart, an unpaid order) from buyers the seller has not approved:

Lookup On failure
B2B pricing the store's own price is used β€” no product is ever unpriced or zeroed
Order limits nothing is blocked β€” the cart and checkout behave as they always did
Buyer group no badge; restricted methods stay available; hidden categories are shown unless "hide when the group is unknown" is ticked (guest rules still apply, guests need no lookup); no shipping discount; the role mirror changes nothing
Wholesale price gate fails closed β€” the customer sees the quote-only catalogue, and can still request a quote
Net terms at checkout fails closed β€” the "Net terms (TackQuote)" payment method is hidden; every other payment method still works

The reasoning for order limits is the one worth stating: a checkout that stops working because a supplier's API is slow costs the day's revenue, while an unenforced minimum costs a phone call. Failures are written to WooCommerce β†’ Status β†’ Logs (source tackquote), so the merchant can see that B2B pricing is not being applied even though the shop still works.

Plan gating

The B2B endpoints are gated server-side by your TackQuote plan β€” the plugin does not check your plan, because a client-side plan check is not a check. On a plan without B2B pricing the API declines and, by the table above, your store simply keeps its own prices.

Development

# Lint (PHP syntax)
find . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n1 php -l

# Offline regression tests (no WordPress install needed)
php tests/run.php

# Build a distributable zip
bash bin/build.sh   # produces dist/tackquote.zip, then runs the release audit
bash bin/ship-audit.sh dist/tackquote.zip   # the audit on its own

bin/ship-audit.sh unzips the built package and fails on anything a merchant or a WordPress.org reviewer should not read in a shipped file: work-item and defect ids, test-run notes, paths into other repositories, sample SKUs and test emails, and debugging leftovers (var_dump, console.log, TODO, localhost, ...). Comments say what the code does and why, in product terms; project history belongs in git and the pull request. bin/build.sh runs it on every build and deletes the zip when it fails.

Coding standards

The plugin is held to the WordPress Coding Standards (WordPress-Extra + WordPress-Docs), the WooCommerce sniffs (WooCommerce-Core) and PHPCompatibilityWP for PHP 7.4+, as configured in phpcs.xml.dist. The bar is zero errors and zero warnings; CI (.github/workflows/ci.yml, job phpcs) fails on either.

composer install      # installs the pinned sniff and PHPStan versions from composer.lock (dev only)
composer lint         # phpcs against phpcs.xml.dist
composer lint:fix     # phpcbf for the auto-fixable part, then run `composer lint` again
composer phpstan      # PHPStan level 5 with WordPress + WooCommerce stubs (phpstan.neon.dist)

PHPStan (.github/workflows/ci.yml, job phpstan) runs at level 5 with no baseline; the few ignoreErrors entries in phpstan.neon.dist are narrow and each says why. The storefront scripts and styles follow the WordPress JavaScript and CSS standards (@wordpress/eslint-plugin recommended with WordPress's Prettier, and @wordpress/stylelint-config); there is still no build step and no Node dependency in this repository. Two stylelint rules are deliberately not applied: selector-class-pattern, because the admin screens use BEM class names (tack-card__head, tack-pill--ok) and the quick-order rows carry the server's status codes (tack-quick-order-not_found), all of which themes may already target; and no-descending-specificity, because reordering rules changes the cascade.

composer.json, composer.lock, phpcs.xml.dist, phpstan.neon.dist and vendor/ are development tooling only: the plugin has no Composer runtime dependency, and bin/build.sh both excludes them from tackquote.zip and fails the build if any of them is found inside it.

Releases are built and attached by the GitHub Actions workflow .github/workflows/release.yml when a v* tag is pushed. That workflow calls scripts/package.sh, which delegates to bin/build.sh, so the two cannot drift. bin/build.sh leaves the repository scaffolding (scripts/, .github/, LICENSE, the Composer files and phpcs.xml.dist) out of the zip.

While GitHub Actions is unavailable, releases are made by hand from a local build: docs/RELEASING.md covers the GitHub release and the WordPress.org SVN release, which bin/wporg-sync.sh stages (trunk, the version tag and the listing assets, from the same zip) without ever committing.

License

GPL-2.0-or-later

About

TackQuote B2B quoting plugin for WooCommerce: request-a-quote buttons, quote-only store mode, hide prices from guests, and wholesale pricing, synced with the TackQuote quoting platform.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages