---
title: "Add Custom Classes To The Variation Add To Cart Buttons"
source: "https://docs.nexcess.com/software/kadence/iconic/show-single-variations/add-custom-classes-to-the-variation-add-to-cart-buttons/"
description: "Some themes add custom classes to their catalog 'add to cart' buttons. If you've installed WooCommerce Show Single Variations, you may notice those buttons don'…"
vertical: "Software"
area: "Show Single Variations"
date: "2021-03-25"
last_modified: "2021-03-25"
---

# Add Custom Classes To The Variation Add To Cart Buttons

Some themes add custom classes to their catalog ‘add to cart’ buttons. If you’ve installed WooCommerce Show Single Variations, you may notice those buttons don’t have those classes applied. Fortunately, it’s easy to add them.

Using a tool like [Code Snippets](https://en-gb.wordpress.org/plugins/code-snippets/), add the following function:

```
/*
 * Add custom button class
 *
 * @param string $class
 *
 * @return string
 */
function iconic_button_class( $class ) {	
	$class .= ' your-custom-class';
	return $class;
}

add_filter( 'jck_wssv_add_to_cart_button_class', 'iconic_button_class', 10 );
```

This will append **your-custom-class** to the button classes. Note that there is space at the beginning of this custom class.
