• 11
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

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.

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.

  • 14
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions