Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support fizanzvai

    (@fizanzvai)

    @kubiq

    Could you try the following snippet?

    add_filter( 'woo_variation_swatches_global_ajax_variation_threshold_max', 'woo_variation_swatches_global_ajax_variation_threshold_max_edit', 10, 2 );
    function woo_variation_swatches_global_ajax_variation_threshold_max_edit( $size, $product ){
    	return 700;
    }

    Thank You

    Thread Starter kubiq

    (@kubiq)

    hello,
    no it’s not working

    i can solve it by

    add_filter( 'default_woo_variation_swatches_single_product_dropdown_html', function( $false, $args, $html, $that ){
    	$get_attribute = woo_variation_swatches()->get_frontend()->get_attribute_taxonomy_by_name( $args['attribute'] );
    	$attribute_type = $get_attribute ? $get_attribute->attribute_type : 'select';
    	if( $attribute_type == 'select' ){
    		return true;
    	}
    	return $false;
    }, 10, 4 );

    Hi there, I have the same need. I am wondering where you added the filter?

    Thanks,
    Craig

    Thread Starter kubiq

    (@kubiq)

    wherever you want @ckdestef
    custom plugin, or theme files eg. functions.php

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘disable swatches for some attributes’ is closed to new replies.