woocommerce_reset_variations_link
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
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>' ) ) : '';