woocommerce_coupon_is_valid

woocommerce_coupon_is_valid

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_coupon_is_valid') is found 1 times:

  • /includes/class-wc-discounts.php line 1063
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
        $this->validate_coupon_excluded_items( $coupon );
        $this->validate_coupon_eligible_items( $coupon );
        $this->validate_coupon_allowed_emails( $coupon );
     
        if ( ! apply_filters( 'woocommerce_coupon_is_valid', true, $coupon, $this ) ) {
            throw new Exception( __( 'Coupon is not valid.', 'woocommerce' ), WC_Coupon::E_WC_COUPON_INVALID_FILTERED );
        }
    } catch ( Exception $e ) {
        /**
         * Filter the coupon error message.
         *

See this hook used in plugins: