cartpops_secondary_btn_classes

Filter the secondary button classes.

Arguments

ArgumentTypeDescription
$attributesArrayHolds the HTML classes
$typeStringButton type
/**
 * Add or filer the secondary button attributes.
 *
 * @param array $attributes Array of HTML classes.
 * @param string $type The secondary button type.
 */
function my_prefix_secondary_btn_classes( $classes, $type ) {
	if ( 'custom_url' === $type ) {
		$classes[] = 'my-custom-class';
		$classes[] = 'another-one';
	}
	return $classes;
}
add_filter( 'cartpops_secondary_btn_classes', 'my_prefix_secondary_btn_classes', 10, 2 );

It's time to improve your WooCommerce Cart

CartPops is a WooCommerce Add To Cart Popup, that helps every shop owner improve their user experience, increase conversions & maximize profits.

Was this page helpful?