woocommerce_cart_coupon_types
Coupon types that apply to the cart as a whole. Controls which validation rules will apply.
Usage
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
- -
Changelog
| Since 2.5.0 | Introduced. |
Where the hook is called
woocommerce_cart_coupon_types
woocommerce/includes/wc-coupon-functions.php 60
return (array) apply_filters( 'woocommerce_cart_coupon_types', array( 'fixed_cart' ) );