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