artjommaierbrhv
Forum Replies Created
-
Hi @bhshravankumar ,
I have found out why this is so. At woocommerce there is a function that shows how many remaining products are over, there is something like: “only 2 left”. I had initially hidden that as well (with I think javascript), which is why it made that move down and took distance for the text (which was hidden). Long story short, this was not due to the Variation Swatches plugin.
Thank you very much for the feedback and your effort!Kind rgds,
Artjom
Thank you @bhshravankumar
Rgds, Artjom
Hi Aamir,
Thank you for your quick response.
I used below php-code to set a variation as default:
add_filter( 'woocommerce_dropdown_variation_attribute_options_html', 'filter_dropdown_option_html', 12, 2 ); function filter_dropdown_option_html( $html, $args ) { $show_option_none_text = $args['show_option_none'] ? $args['show_option_none'] : __( 'Choose an option', 'woocommerce' ); $show_option_none_html = '<option value="">' . esc_html( $show_option_none_text ) . '</option>'; $html = str_replace($show_option_none_html, '', $html); return $html; }
And This php-code to disable the “clear” button:
add_filter( 'woocommerce_reset_variations_link', '__return_empty_string', 9999 );
The only Problem that I still have is:
When I click on different variation swatches, the height below changes (where usually the ‘clear’ button is). I also haven’t figured out how to disable it.
Rgds,
Artjom
- This reply was modified 1 year, 8 months ago by artjommaierbrhv.
- This reply was modified 1 year, 8 months ago by artjommaierbrhv.
- This reply was modified 1 year, 8 months ago by artjommaierbrhv.
- This reply was modified 1 year, 8 months ago by artjommaierbrhv.
Hi Aamir,
Is there a way to disable the “clear” button completely?
Rgds, Artjom
- This reply was modified 1 year, 8 months ago by artjommaierbrhv.