Description
apply_filters( 'product_type_options', array( $attributes )
Parameters (1) (array)
Sample
array( 'virtual' => array( 'id' => '_virtual', 'wrapper_class' => 'show_if_simple', 'label' => __( 'Virtual', 'wcvendors-pro' ), 'description' => __( 'Virtual products are intangible and aren\'t shipped.', 'wcvendors-pro' ), 'default' => 'no' ), 'downloadable' => array( 'id' => '_downloadable', 'wrapper_class' => 'show_if_simple', 'label' => __( 'Downloadable', 'wcvendors-pro' ), 'description' => __( 'Downloadable products give access to a file upon purchase.', 'wcvendors-pro' ), 'default' => 'no' ) )
Usage Examples
To run the filter, copy this sample
$array_val = apply_filters( 'product_type_options', array( $attributes ) ); if ( ! empty( $array_val ) ) { // what has been modified... }
To make a callback function, copy this sample
// the filter_product_type_options callback function filter_product_type_options( array( $attributes) ) { // do your thing here :-) ... return $array_val; } add_filter( 'product_type_options', 'filter_product_type_options', 10, 1 );
To remove the filter, copy this sample
//remove the filter remove_filter( 'product_type_options', 'filter_product_type_options', 10, 1 );
Defined
This filter is defined in the following source file(s)
- wcvendors-pro/public/forms/class-wcvendors-pro-product-form.php line 687
$product_type_options = apply_filters( 'product_type_options', array(