WooCommerce coupon for logged in user only

Use WooCommerce hook woocommerce_coupon_is_valid to check if coupon is valid.

Example shows how to make sure certain coupons are valid for logged in users only.
Same example can be use to extend validation, for example using global $current_user would allow you to validate any user information, eg: restrict coupon based on user role.

Leave a Reply

Your email address will not be published. Required fields are marked *