woocommerce_attribute_default_visibility

woocommerce_attribute_default_visibility

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_attribute_default_visibility') is found 1 times:

  • /includes/class-wc-ajax.php line 629
     
    		$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',
    				'variable' === $product_type ? 1 : 0,
    				$product_type
    			)