-
Notifications
You must be signed in to change notification settings - Fork 214
Fix missing and conflicting connected/disconnected withdraw status in admin vendor profile #3097
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
base: develop
Are you sure you want to change the base?
Conversation
… admin vendor profile
📝 WalkthroughWalkthroughAdds additional vendor/payment metadata to StoreController API responses: when the requester is authorized, the controller fetches seller payment methods and injects bank payment required fields, active/connected/disconnected methods, withdraw options, field placeholders, and chargeable methods. Also defaults the method's third parameter to an empty array. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 1
🤖 Fix all issues with AI agents
In `@includes/REST/StoreController.php`:
- Around line 730-731: Remove the redundant vendor lookup and avoid premature
data retrieval: stop calling dokan()->vendor->get($store->get_id()) and use the
existing $store object directly for its ID; also move the call to
dokan_get_container()->get('dashboard')->templates->settings->get_seller_payment_methods(...)
so it runs inside the if ($is_authorized) block (assign $methods_data there
using $store->get_id()), eliminating the unconditional $methods_data fetch for
unauthorized requests.
All Submissions:
Changes proposed in this Pull Request:
Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
Changelog entry
Title
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