woocommerce_attribute_default_is_variation

woocommerce_attribute_default_is_variation

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.7.9.0

apply_filters('woocommerce_attribute_default_is_variation') is found 1 times:

  • /includes/class-wc-ajax.php line 622
    		$attribute->set_id( wc_attribute_taxonomy_id_by_name( sanitize_text_field( wp_unslash( $_POST['taxonomy'] ) ) ) );
    		$attribute->set_name( sanitize_text_field( wp_unslash( $_POST['taxonomy'] ) ) );
    		/* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */
    		$attribute->set_visible( apply_filters( 'woocommerce_attribute_default_visibility', 1 ) );
    		$attribute->set_variation( apply_filters( 'woocommerce_attribute_default_is_variation', 1 ) );
    		/* phpcs: enable */
    
    		if ( $attribute->is_taxonomy() ) {
    			$metabox_class[] = 'taxonomy';
    			$metabox_class[] = $attribute->get_name();
    		}