Home > Docs > Frequently Bought Together for WooCommerce > Alter Threshold Values to Generate Frequently Bought Together Recommendation

Alter Threshold Values to Generate Frequently Bought Together Recommendation

Last updated on July 27, 2023

The Frequently Bought Together for WooCommerce plugin uses a very effective algorithm to list the frequently bought together products. This algorithm uses fixed threshold values to determine whether a product belongs to the FBT list. To know more about the algorithm, refer to the article.

Based on the Inventory of the store, there may be a need to alter these threshold values to meet the store’s needs, and this article explains how to modify this threshold using code snippets.

  1. From the WordPress admin dashboard, navigate to Appearance > Theme File Editor.
  2. Under the theme files, select functions.php
  3. Copy the code snippet for the threshold that you want to alter.
  4. Paste the code snippet at the end of the functions.php file.

Minimum order count

The minimum order count refers to the minimum number of orders required for the reference product to be eligible for inclusion in the ‘Frequently Bought Together‘ listing. By default, the number is 5. To alter the minimum order count, use the given code snippet:

Minimum support percentage

Minimum Support Percentage is a parameter that determines the minimum percentage of orders containing the reference product that must also include a candidate product. By default, this value is set to 5%. To alter the Minimum Support Percentage, use the given code snippet:

Minimum support number

Minimum Support Number is a parameter that sets the minimum number of orders containing the reference product that must include a candidate product. By default, this value is set to 10. To alter the Minimum Support Number, use the given code snippet:

Background support number

The background support number is the minimum number of orders required for a candidate product to be considered significant. By default, the value is 10. To alter the background support number, use the given code snippet:

Significance score – Minimum threshold

The Minimum threshold is the minimum value of the Significance score needed to consider a product as frequently bought together. By default, the value is 0.2. To alter the Significance score, use the given code snippet: