The WooCommerce Product Recommendations 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, Understanding the Functionality of the Frequently Bought Together Algorithm.
Based on the store’s inventory, these threshold values may need to be altered to meet the store’s needs, and this article explains how to modify this threshold using code snippets.
- From the WordPress admin dashboard, navigate to Appearance > Theme File Editor.
- Under the theme files, select functions.php
- Copy the code snippet for the threshold that you want to alter.
- 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: