woocommerce_coupon_validate_expiry_date

woocommerce_coupon_validate_expiry_date

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_coupon_validate_expiry_date') is found 1 times:

  • /includes/class-wc-discounts.php line 705
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    * @param  WC_Coupon $coupon Coupon data.
     * @return bool
     */
    protected function validate_coupon_expiry_date( $coupon ) {
        if ( $coupon->get_date_expires() && apply_filters( 'woocommerce_coupon_validate_expiry_date', time() > $coupon->get_date_expires()->getTimestamp(), $coupon, $this ) ) {
            throw new Exception( __( 'This coupon has expired.', 'woocommerce' ), 107 );
        }
     
        return true;
    }