-
Notifications
You must be signed in to change notification settings - Fork 206
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
Add $data parameter to dokan_update_vendor hook #2386
Add $data parameter to dokan_update_vendor hook #2386
Conversation
- Added $data array as second parameter to dokan_update_vendor action hook - Updated doc block for dokan_update_vendor hook to reflect new parameter - Added doc block for dokan_before_update_vendor hook
WalkthroughThe changes in this pull request focus on the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
includes/Vendor/Manager.php (2)
432-439
: Update the version number in the docblockThe implementation of the
dokan_before_update_vendor
action hook looks good. It's correctly placed before the vendor update and passes appropriate parameters. However, the version number is missing in the docblock.Please update the docblock with the correct version number:
- * @since [insert version number here] + * @since 3.7.22
444-452
: Update the version number and improve wording in the docblockThe implementation of the
dokan_update_vendor
action hook is correct. It's properly placed after the vendor update and passes appropriate parameters. However, there are two minor improvements needed in the docblock:
- The version number is missing.
- The wording can be slightly improved for clarity.
Please update the docblock as follows:
- * Fires after a vendor has been updated. + * Fires after a vendor is updated. * - * @since [insert version number here] + * @since 3.7.22
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- includes/Vendor/Manager.php (1 hunks)
🔇 Additional comments (1)
includes/Vendor/Manager.php (1)
432-452
: LGTM: New action hooks enhance extensibilityThe addition of
dokan_before_update_vendor
anddokan_update_vendor
action hooks significantly improves the extensibility of the vendor update process. These hooks allow developers to perform custom actions before and after a vendor is updated, which aligns well with the PR objectives.The implementation is correct, and the hooks are placed at appropriate points in the update process. The only minor issues were in the documentation, which have been addressed in previous comments.
These changes provide developers with more control and flexibility when working with vendor updates, which is a valuable improvement to the Dokan plugin.
* Add: add product form tests (getdokan#2385) * Add: add product form tests (download options, inventory) * Fix : revert unwanted changes * Add & Refactor vendor payment tests (getdokan#2387) * Add: add vendor payment tests * Update: update feature map * Update: remove test.only * Add $data parameter to dokan_update_vendor hook (getdokan#2386) * Add $data parameter to dokan_update_vendor hook - Added $data array as second parameter to dokan_update_vendor action hook - Updated doc block for dokan_update_vendor hook to reflect new parameter - Added doc block for dokan_before_update_vendor hook * update: hook doc blocks * update:hook metadata with since attribute * chore: Release Version 3.12.4 --------- Co-authored-by: Al Amin Ahamed <[email protected]> Co-authored-by: Shazahanul Islam Shohag <[email protected]>
All Submissions:
Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
Changelog entry
Enhanced Vendor Update Hook Functionality
Added $data parameter to the dokan_update_vendor action hook, allowing developers to access the full array of updated vendor data. Updated related documentation to reflect this change and added missing doc block for dokan_before_update_vendor hook.
Before Changes
The dokan_update_vendor hook only passed the vendor ID, limiting the information available to hooked functions.
After Changes
The dokan_update_vendor hook now passes both the vendor ID and the full $data array, providing more comprehensive information to hooked functions.
Feature Video (optional)
N/A
PR Self Review Checklist:
FOR PR REVIEWER ONLY:
Summary by CodeRabbit
dokan_before_update_vendor
anddokan_update_vendor
, enhancing integration and customization options.