woocommerce_reset_variations_link filter-hookWC 2.5.0

Filters the reset variation button.

Usage

add_filter( 'woocommerce_reset_variations_link', 'wp_kama_woocommerce_reset_variations_link_filter' );

/**
 * Function for `woocommerce_reset_variations_link` filter-hook.
 * 
 * @param string $button The reset variation button HTML.
 *
 * @return string
 */
function wp_kama_woocommerce_reset_variations_link_filter( $button ){

	// filter...
	return $button;
}
$button(string)
The reset variation button HTML.

Changelog

Since 2.5.0 Introduced.

Where the hook is called

In file: /templates/single-product/add-to-cart/variable.php
woocommerce_reset_variations_link
woocommerce/templates/single-product/add-to-cart/variable.php 55
echo end( $attribute_keys ) === $attribute_name ? wp_kses_post( apply_filters( 'woocommerce_reset_variations_link', '<a class="reset_variations" href="#" aria-label="' . esc_attr__( 'Clear options', 'woocommerce' ) . '">' . esc_html__( 'Clear', 'woocommerce' ) . '</a>' ) ) : '';
woocommerce/src/Blocks/BlockTypes/AddToCartWithOptionsVariationSelector.php 290-297
apply_filters(
	'woocommerce_reset_variations_link',
	sprintf(
		'<button class="reset_variations" aria-label="%1$s">%2$s</button>',
		esc_html__( 'Clear options', 'woocommerce' ),
		esc_html__( 'Clear', 'woocommerce' )
	)
)

Where the hook is used in WooCommerce

Usage not found.