Closed MdAsifHossainNadim closed 4 weeks ago
The is_pro_license_active
method in Helper.php
has been enhanced to improve its reliability. The new implementation uses a try-catch block to handle potential exceptions and checks the validity of the Dokan Pro license, ensuring compatibility with older versions of the software.
File | Summary |
---|---|
includes/Admin/Notices/Helper.php |
Updated is_pro_license_active method to use a try-catch block and validate the Dokan Pro license. |
sequenceDiagram
participant Client
participant Helper
participant DokanPro
Client->>Helper: is_pro_license_active()
activate Helper
alt Dokan Pro is old version
Helper->>DokanPro: dokan_pro()->license
DokanPro-->>Helper: Exception
Helper-->>Client: false
else Dokan Pro is current version
Helper->>DokanPro: dokan_pro()->license
DokanPro-->>Helper: license object
Helper->>DokanPro: license->is_valid()
DokanPro-->>Helper: true/false
Helper-->>Client: true/false
end
deactivate Helper
In code we trust, with changes bright,
A license check now set just right.
Through try and catch, we forge ahead,
Ensuring all the paths are tread.
With Dokan Pro, both old and new,
Our Helper's work is clear and true.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All Submissions:
Changes proposed in this Pull Request:
Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
Changelog entry
Fix: Dokan promo license activation handler method.
Detailed Description of the pull request. What was previous behaviour and what will be changed in this PR.
Before Changes
Describe the issue before changes with screenshots(s).
After Changes
Describe the issue after changes with screenshot(s).
Feature Video (optional)
Link of detailed video if this PR is for a feature.
PR Self Review Checklist:
FOR PR REVIEWER ONLY:
Summary by CodeRabbit