Configuration
Pair Pro stores its settings in the pair_pro_settings option. The settings page is available under WooCommerce → Pair Pro and requires the manage_woocommerce capability.
Block settings
Section titled “Block settings”- Enable (
enabled), the master switch. When off, Pair Pro renders nothing on the storefront. - Heading (
heading), shown above the block. Defaults to “Frequently bought together”. Leave it blank to render the grid without a heading. - Products (
count), how many co-purchased products to show, clamped from 1 to 6. - Columns (
columns), clamped from 1 to 6. - Add all to cart (
add_all), shows a one-click button that adds every product in the block to the cart. - In stock only (
in_stock_only), excludes out-of-stock products from the results. - Orders to analyse (
scan_orders), how many of the most recent paid orders are scanned for co-purchases, clamped from 20 to 1000. Defaults to 150.
How the scan works
Section titled “How the scan works”For each viewed product, Pair Pro fetches the most recent orders with status completed or processing (up to the configured scan depth), keeps the orders that contain the viewed product, and counts how often each other product appears alongside it. Order lines are attributed to their parent product, so variations of the same product collapse into one recommendation. Products are ranked by co-purchase count, highest first.
The ranked list (up to 12 products) is cached in a transient (pair_pro_fbt_<product id>) for 12 hours per product, so the scan runs at most once per cache window regardless of the configured count.
Recommended products must be published, visible in the catalog and, with the default filter on, in stock. The block hides itself entirely when no co-purchase data survives the filters.
Placement and markup
Section titled “Placement and markup”The block hooks into woocommerce_after_single_product_summary at priority 14, one step before the free “You may also like” block at 15, so it always renders above it. It reuses the free plugin’s .pair-recommendations markup with a --bought-together modifier and renders products through WooCommerce’s product loop template, so it inherits the active theme’s product cards. Pair Pro adds one small stylesheet that depends on the free Pair stylesheet; there is no frontend JavaScript.
Add all to cart
Section titled “Add all to cart”The button submits a plain POST form protected by a nonce. On submit, Pair Pro adds each product from the block to the cart, skipping anything that is not purchasable or not in stock, shows the standard WooCommerce added-to-cart message and redirects back to the page you came from. Because it is a normal form post, it works with JavaScript disabled.
Storage and uninstall
Section titled “Storage and uninstall”Pair Pro stores only:
pair_pro_settingspair_pro_versionpair_pro_activated_atpair_pro_db_versionpair_pro_fbt_<product id>transients (the 12-hour co-purchase cache)
The uninstall routine removes all of these, including the cached transients. Pair Pro does not create custom database tables.
Developer hooks
Section titled “Developer hooks”Pair Pro boots when the free plugin fires pair/booted, registers its services in the shared Pair container and fires pair-pro/booted with the booted PRO instance once ready.