Configuration
Ta treść nie jest jeszcze dostępna w Twoim języku.
Pair stores its settings in the pair_settings option. The settings page is available under WooCommerce → Pair recommendations and requires the manage_woocommerce capability.
Placements
Section titled “Placements”- Enable recommendations (
enabled), the master switch. When off, Pair renders nothing. - On the single product page (
show_on_single), renders recommendations after the product summary. - Under the cart (
show_on_cart), renders recommendations below the cart. - Show recently viewed products (
show_recently_viewed), enables the separate recently viewed block. - Recently viewed on product pages (
recently_on_single), renders recently viewed products on product pages. - Recently viewed on the cart (
recently_on_cart), renders recently viewed products on the cart. - Only recommend products that are in stock (
in_stock_only), excludes out-of-stock products from the results.
Strategies
Section titled “Strategies”- Product-page strategy (
single_strategy), defaults torelated. - Cart strategy (
cart_strategy), defaults torelated.
Accepted values are:
| Value | Meaning |
|---|---|
related | Products from the same categories, ordered by popularity. |
tags | Products sharing product tags. |
bestsellers | Best-selling products. |
newest | Most recently published products. |
recently | Products the shopper recently viewed. |
Every strategy falls back to recent products if there are not enough matches.
Grid controls
Section titled “Grid controls”- Number of products (
count), clamped from 1 to 12. - Columns (
columns), clamped from 1 to 6.
The grid is rendered through WooCommerce’s product loop template, so it inherits the active theme’s product card markup.
Headings
Section titled “Headings”- Product-page heading (
single_heading), shown above product-page recommendations. - Cart heading (
cart_heading), shown above cart recommendations. - Recently viewed heading (
recently_heading), shown above recently viewed products.
Leave a heading blank to use the packaged default.
Shortcode
Section titled “Shortcode”[pair_recommendations][pair_recommendations strategy="bestsellers" count="4" columns="4"][pair_recently_viewed count="4" columns="4"]Attributes:
| Attribute | Range | Description |
|---|---|---|
strategy | related, tags, bestsellers, newest, recently | Overrides the configured recommendation strategy. |
count | 1-12 | Overrides the configured product count for this block. |
columns | 1-6 | Overrides the configured column count for this block. |
heading | text | Overrides the block heading. |
On a product page, [pair_recommendations] uses the current product. Outside a product page it uses the cart contents. [pair_recently_viewed] always uses the shopper’s recently viewed product IDs.
Storage and uninstall
Section titled “Storage and uninstall”Pair stores only:
pair_settingspair_db_version
The uninstall routine removes both options. It does not create custom database tables.