Snipcart plugin - Undefined variable: class

Hi,

I am just starting out using the Snipcart plugin, and think I have everything set up correctly. I am, however, getting an error on the individual product pages:

Undefined variable: class

This is triggered by this line in the product-add-to-cart.php snippet:

<button class="snipcart-add-item <?= $class ?>

What is the purpose of this variable? If I delete it everything works fine.

Thanks for any input!

You could pass an additional class name by passing it to the snippet, or rather in this case you either have to, or remove it.

<?= snippet('product/add', ['class' => 'someclass']) ?>