Closed pronob1010 closed 2 weeks ago
The changes involve adding a conditional check in the file templates/products/dokan-category-header-ui.php
to verify whether the Dokan Pro plugin is active before displaying the "Add new category" button in the category selection modal. This modification ensures that the button appears only when both the Dokan Pro plugin is installed and active, and the variable $is_single
is false. The overall structure and functionality of the modal remain unchanged.
File Path | Change Summary |
---|---|
templates/products/dokan-category-header-ui.php | Added a check for dokan()->is_pro_exists() alongside the existing $is_single condition to control the visibility of the "Add new category" button. |
🐇 In the garden where categories grow,
A button appears, but only for those who know.
If Dokan Pro's in play, it shines so bright,
Adding new categories feels just right!
With a hop and a skip, let's make it clear,
Only when it's active, the button draws near! 🌼
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?
Recommended Changelog:
All Submissions:
Changes proposed in this Pull Request:
Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
Changelog entry
Restrict multiple categories in free plan
Check if Dokan Pro exists: this will prevent the
Add new category
button from showing in the free plan.Before Changes
After Changes
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
New Features
Bug Fixes