Home Forums Pre-Sale Purchase “WooCommerce Product Variations Swatches Premium” version 1.1.6 – Remove “Choose an option” label

Purchase “WooCommerce Product Variations Swatches Premium” version 1.1.6 – Remove “Choose an option” label

  • Author
    Posts
  • #240229

    Hello,
    I need to purchase your module “WooCommerce Product Variations Swatches Premium” version 1.1.6 – The free version creates problems for the entire website.

    I also ask for your confirmation on the possibility of solving the following problem:

    I need to remove the “choose an option” label.
    With the following code and without your module the “choose an option” label is not visible for an unlimited number of variations:

    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 = ” . esc_html( $show_option_none_text ) . ”;
    $html = str_replace($show_option_none_html, ”, $html);
    return $html;
    }

    With your module active, the “choose an option” label is removed for products with a limited number of variables, while, on products with many variables (I tested 50 / 70 variations) the “choose an option” label is visible.

    Thank you

You must be logged in to see replies to this topic. Click here to login or register