Remove the reset variation button on WooCommerce variable products

10,305

The following will disable the reset variation button on variable products:

add_filter('woocommerce_reset_variations_link', '__return_empty_string');

Code goes in function.php file of your active child theme (or active theme). Tested and works.

Share:
10,305
Admin
Author by

Admin

Updated on June 22, 2022

Comments

  • Admin
    Admin almost 2 years

    On variable products, I would like to remove the reset variation button that appears on my WooCommerce product page when selecting variations (ex. Size, colour), that allows to reset all the choices that have been made.

    This pop-up, even when not displayed yet, modifies the display of the Variation tab. Last variation tab is not aligned with the other tabs (because some space is needed for the pop-up to appear).

    What should I do to not call this function at all (so no space is needed for the pop-up and the variation tabs display correctly) ?

    I've tried to make it invisible, but it is not enough. I would like to not call it at all.

    <a class="reset_variations" href="#" style="visibility: visible; display: block;">Reset</a>
    

    On the "click" event a javascript is called.

    I expect the javascript not to be called so that the variation tab displays correctly.

  • LoicTheAztec
    LoicTheAztec about 3 years
    @oleviolin This thread has nothing to do with delete variations, so remove your comment please.