product_type_options хук-фильтр . WC 1.0
Return array of product type options.
Использование
add_filter( 'product_type_options', 'filter_function_name_1011' ); function filter_function_name_1011( $array ){ // filter... return $array; }
- $array
- -
Где вызывается хук
product_type_options
woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-data.php 56-74
return apply_filters( 'product_type_options', array( 'virtual' => array( 'id' => '_virtual', 'wrapper_class' => 'show_if_simple', 'label' => __( 'Virtual', 'woocommerce' ), 'description' => __( 'Virtual products are intangible and are not shipped.', 'woocommerce' ), 'default' => 'no', ), 'downloadable' => array( 'id' => '_downloadable', 'wrapper_class' => 'show_if_simple', 'label' => __( 'Downloadable', 'woocommerce' ), 'description' => __( 'Downloadable products give access to a file upon purchase.', 'woocommerce' ), 'default' => 'no', ), ) );