Many clients want to hide the add-on products when they are out of stock because out-of-stock add-ons create gaps between the available add-ons.
For a better understanding, please refer to the screenshot.
Screenshot:

If this is your issue, please check that your addon products are still showing on the frontend page. To resolve the layout problem, you need to follow our instructions.
Steps to Override the Given File
- File Name:
cpb-single-addon-product.php
- File Path:
\templates\product-layouts\desktop-layouts\cpb_grid_layout\addon-product\cpb-single-addon-product.php
Instructions:
- Create a Templates Folder
- Inside the
functions.php
file of the active theme, create a folder namedtemplates
.
- Inside the
- Create Product Layouts Folder
- Inside the
templates
folder, create a folder namedproduct-layouts
.
- Inside the
- Create Desktop Layouts Folder
- Inside the
product-layouts
folder, create a folder nameddesktop-layouts
.
- Inside the
- Create CPB Grid Layout Folder
- Inside the
desktop-layouts
folder, create a folder namedcpb_grid_layout
.
- Inside the
- Create Addon Product Folder
- Inside the
cpb_grid_layout
folder, create a folder namedaddon-product
.
- Inside the
- Paste the File
- Finally, paste the given file (
cpb-single-addon-product.php
) into theaddon-product
folder.
- Finally, paste the given file (