-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Add Function to Check Voucher Validity #51
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next to the code change, could you add a sentence to the README so the new feature is documented? Thanks!
Nice addition. 👍
Thank you for your feedback! I've made the requested changes, introducing two distinct methods, Additionally, I've updated the README to reflect these changes. Now, you can refer to the documentation for clear usage examples: Vouchers::isValidCode('ABCD-EFGH'); // true or false
Vouchers::isValidVoucher($voucher); // true or false |
Description:
Issue: #42
Fix Commit: [feat-valid-vouchers 1f2ea43]
I've created a pull request to address the issue raised by @Temian1 regarding checking the validity of a voucher. The proposed change introduces a new function called
isValid()
that allows users to check whether a voucher is still valid or has been used.Code Changes:
This function will return true if the voucher is valid and false if it's invalid or has expired.