Liquid error: product form must be given a product

My website shows “Liquid error (product-card line 159): product form must be given a product” when I click “Choose Options” on a product while scrolling through a collection.

The line in question here begins with {%- form ‘product’

I use the Whisk Theme. This was not happening until the Recharge support team injected their code into ours. I cannot find the fix for this problem.

{%- if show_quick_add and product_card_product.has_only_default_variant == false -%}

This error message “Liquid error (product-card line 159): product form must be given a product” indicates that the “product” form tag on line 159 is missing the required “product” argument, causing the error.

To fix this issue, make sure that the “product” argument is properly passed to the form tag on line 159.

{%- form ‘product’, product, … -%}

where “product” is the variable that holds the product information to be used in the form. If the variable is not defined, you may need to add a reference to it earlier in your code.