-
Notifications
You must be signed in to change notification settings - Fork 214
Fix admin withdraw tab conflicting connection status messages (#5343) #3081
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
📝 WalkthroughWalkthroughThe pull request adds REST API integration to expose vendor payment method data in store settings responses, updates deprecated magic method signatures from Changes
Sequence DiagramsequenceDiagram
actor Client
participant REST as REST API
participant Settings as Settings Class
participant Vendor as Vendor/Store Object
participant PaymentMethods as Payment Methods Logic
Client->>REST: GET /store-settings
REST->>Settings: dokan_rest_store_settings_additional_fields filter
Settings->>Vendor: Extract vendor_id from store object
Settings->>PaymentMethods: get_seller_payment_methods(vendor_id)
PaymentMethods-->>Settings: Payment method data
Settings->>Settings: Augment response with<br/>withdraw_methods_available<br/>active_payment_methods<br/>connected_methods<br/>disconnected_methods
Settings-->>REST: Enhanced additional_fields
REST-->>Client: Store settings + payment methods
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
…method is configured
…method is configured
All Submissions:
Changes proposed in this Pull Request:
This PR fixes an issue where the Admin → Vendor → Withdraw tab displayed
conflicting and misleading connection status messages when no withdrawal
methods were enabled.
Previously, the UI showed:
This was confusing and incorrect when no withdrawal methods were configured.
The fix aligns the admin React UI behavior with the existing PHP
settings.phplogic by properly validating active withdrawal methodsbefore rendering the withdraw interface.
Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
“No withdraw method is available. Please enable payment method from settings.”
is shown.
Changelog entry
Fix admin withdraw tab conflicting connection status messages
Previously, the Admin Vendor Withdraw tab showed contradictory “Connected”
and “Not Connected” messages when no withdrawal methods were enabled.
This PR fixes the issue by ensuring the UI follows the same logic as the
settings page and renders a single, clear message when no methods are available.
Before Changes
After Changes
Feature Video (optional)
N/A
PR Self Review Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.