woocommerce_product_coupon_types
Coupon types that apply to individual products. Controls which validation rules will apply.
Использование
add_filter( 'woocommerce_product_coupon_types', 'wp_kama_woocommerce_product_coupon_types_filter' ); /** * Function for `woocommerce_product_coupon_types` filter-hook. * * @param $array * * @return */ function wp_kama_woocommerce_product_coupon_types_filter( $array ){ // filter... return $array; }
- $array
- -
Список изменений
С версии 2.5.0 | Введена. |
Где вызывается хук
woocommerce_product_coupon_types
woocommerce/includes/wc-coupon-functions.php 49
return (array) apply_filters( 'woocommerce_product_coupon_types', array( 'fixed_product', 'percent' ) );