Direct answer
Change the two bounded arguments WooCommerce uses for its native related-products section: set the requested product count from 1 to 12 and columns from 1 to 6, with columns never greater than the count. Leave every other argument unchanged. WooCommerce should still choose which products are related and their order, and it may return fewer products than requested. Product blocks, page builders, shortcodes, and custom related-product plugins can use different queries and should remain untouched. Turning the setting off should return the native WooCommerce arguments without rewriting products, relationships, or templates.
Set Related Products Count for WooCommerce follows that boundary. Free saves one global count and column choice for the native single-product section. Pro adds up to twenty-five product-category choices and is available for $39 per year for one site with a 14-day no-card trial.
Choose the smallest suitable approach
| Approach | What it changes | Main tradeoff |
|---|---|---|
| Focused setting | Count and columns in the native related section | Clear bounds and immediate rollback |
| Theme or tutorial snippet | The same arguments as code you maintain | A bad count/column combination can leave an awkward row |
| Broad merchandising suite | Selection, sorting, sliders, templates, upsells, or cross-sells | A larger setup and support surface for two display numbers |
Public support reports show the visible problem. One merchant expected four items but WooCommerce showed only three and support pointed to code. Another tried to show four columns with custom code and ended with a stranded item. A third asked how to increase the count and found the theme control limited to a paid edition.
These posts describe individual stores. They do not prove general demand, sales, or willingness to pay for this exact setting.
Keep recommendation ownership in WooCommerce
The native related-products section should still let WooCommerce decide:
- which product IDs are related;
- which categories and tags contribute to that decision;
- product exclusions;
- the final ordering;
- whether enough eligible products exist;
- the native template and markup.
The official WooCommerce guide for changing the number of related products uses a code snippet to alter count and columns.
A focused settings tool can own those two numbers without becoming a recommendation engine.
It should not add manual product selection, upsells, cross-sells, sorting, a slider, CSS, templates, responsive breakpoints, or builder adapters.
Change only two native arguments
WooCommerce exposes the native section through woocommerce_output_related_products_args. The current WooCommerce template-functions source shows the related-products output path.
A safe filter should:
- Confirm the setting is enabled.
- Confirm the incoming value is an argument array.
- Confirm the saved count is an integer from 1 to 12.
- Confirm columns is an integer from 1 to 6.
- Keep columns at or below the count.
- Change only
posts_per_pageandcolumns. - Preserve every other incoming key and value.
- Return the original array when settings or context are invalid.
The requested count is a ceiling, not a promise. WooCommerce can return fewer products when it finds fewer eligible candidates.
Set and verify the global values
- Open WooCommerce > Related Products.
- Select Use my display choices.
- Set Products to show from 1 to 12.
- Set Columns from 1 to 6.
- Save the settings.
- Open a published product with eligible related products.
- Count the items in the native Related products section.
- Confirm the column value does not exceed the requested item count.
- Open a second product with fewer eligible candidates.
- Confirm WooCommerce may show fewer items without filling the section with unrelated products.
- Turn off the setting and confirm native values return.
Test a normal single-product page. A builder preview or a Product Collection block may not use this output path.
Diagnose an unexpected section
| Symptom | Check first | Safe expected behavior |
|---|---|---|
| Count does not change | Enabled switch, saved bounds, and page cache | Valid global values affect the native section only |
| Fewer items appear | Number of eligible related products | WooCommerce may return fewer than requested |
| Columns look different | Theme CSS or a replacement template | The plugin changes the argument, not CSS |
| A block or builder grid is unchanged | Whether it uses the native arguments filter | Non-native output remains untouched |
| One category behaves differently | Saved Pro category choice | A valid category choice can override the global values |
| The section is missing | Theme setting, another plugin, or no eligible products | The plugin does not create an empty section |
Clear full-page and object caches after changing display settings. Then test while signed out.
Use category choices with Pro
Pro adds up to twenty-five category-specific count and column pairs.
The interface shows:
- the product-category name;
- Products to show from 1 to 12;
- Columns from 1 to 6;
- a Remove checkbox for each saved row.
Products without a valid saved category use the global Free values. If a product belongs to several configured categories, the implementation resolves a valid category from the product's assigned category IDs. It does not write or reorder those category assignments.
If Pro, the network, or the license service is unavailable, the global Free setting continues locally.
Native section, blocks, and builders
The supported surface is WooCommerce's native single-product related section using the documented arguments filter.
Product blocks, page builders, shortcodes, widgets, theme-specific queries, and custom related-product plugins can choose their own data and markup. This release makes no claim outside the native filter and does not try to intercept every product grid.
That narrow boundary avoids a fragile matrix of themes, builders, query tools, sliders, and CSS systems.
Safety, privacy, and resource boundary
- Setting writes require
manage_woocommerceand a valid WordPress nonce. - Free stores one enabled state, one count, and one columns value.
- Pro stores at most twenty-five bounded category choices.
- Products, categories, tags, relationships, related IDs, orders, customers, and templates are never written.
- No product text or visitor behavior is sent to StoreFixKit.
- Product-page rendering makes no remote request.
- There is no custom table, cron event, queue, telemetry, frontend JavaScript, or stylesheet.
- The runtime reads bounded owned options and changes two values in one valid array.
The Pro license and update service is contacted only from authenticated administration actions.
Roll back without rebuilding recommendations
- Deactivate Pro and confirm the global Free values remain.
- Turn off Use my display choices.
- Reload a native product page and confirm native count and columns return.
- Deactivate Free if further isolation is needed.
- Install the previous deterministic ZIP if a version rollback is required.
- Repeat the native single-product check.
No product or relationship migration is involved. Rollback removes the read-time argument change.
Default uninstall preserves settings for accidental recovery. Defining STOREFIXKIT_DELETE_DATA as true before deletion removes only this product's owned options. It does not delete products, categories, tags, relationships, orders, customers, or templates.
Common mistakes
- Treating the requested count as a guarantee. WooCommerce may have fewer eligible products.
- Choosing more columns than products. Keep columns at or below the count.
- Expecting the setting to change a page-builder grid or Product Collection block.
- Using a recommendation suite when the only requirement is two bounded display values.
- Assuming count control changes which products WooCommerce selects.
- Adding CSS to compensate for a theme that replaced the native section without first identifying the owner of that layout.
Market evidence boundary
The WooCommerce Marketplace lists Linked Products for WooCommerce at $59 per year. That product belongs to the adjacent paid category of related-product merchandising. It is broader than this count-setting job. It is not an exact count-setting comparator and is not proof of same-function sales.
Captured WordPress.org data reported 10,000 active installs for one broader related-products suite and 5,000 for a manual-selection plugin. Those installations belong to those plugins. They do not establish StoreFixKit users, buyers, conversion, or revenue.
The captured WooCommerce API reported 7,000,000 active installs. That describes the parent ecosystem, not demand for this narrow display setting.
The exact US search phrase in the captured keyword packet was small. Product continuation therefore needs measured ecosystem discovery, completed setup, trial starts, paid conversion, refunds, renewals, and support load within the post-release validation period.
Frequently asked questions
Does this choose which related products appear?
No. WooCommerce still chooses product IDs and order. The plugin changes only requested count and columns.
Why can fewer products appear than I selected?
WooCommerce may find fewer eligible related products than the requested maximum.
Can this change a Product Collection block or page-builder grid?
No. Those surfaces may use another query and remain unchanged by design.
Can Pro set a value for one product?
No. Pro uses bounded product-category choices, with no per-product rules or product writes.
What happens after deactivation?
The incoming WooCommerce related-products arguments are returned without modification on the next request.
Focused plugin
Use the one-job implementation.
Choose a bounded number of related products and safe columns for WooCommerce's native single-product section without changing product selection, order, relationships, templates, or styling.