-
Notifications
You must be signed in to change notification settings - Fork 214
fix:fatal-error-during-user-subscription-renewal #3096
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
📝 WalkthroughWalkthroughRead/write of commission metadata moved from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
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
🧪 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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
includes/Commission/Settings/OrderItem.php (1)
43-55: Add fallback read for legacy meta key.
Existing orders likely still storedokan_commission_meta. Reading only_dokan_commission_metacan silently drop commission data, affecting historical renewals and calculations.✅ Suggested backward-compatible read
- $commission_meta = $this->order_item->get_meta( '_dokan_commission_meta', true ); + $commission_meta = $this->order_item->get_meta( '_dokan_commission_meta', true ); + if ( empty( $commission_meta ) ) { + $commission_meta = $this->order_item->get_meta( 'dokan_commission_meta', true ); + }
🧹 Nitpick comments (1)
includes/Commission/Settings/OrderItem.php (1)
88-93: Optional: clean up legacy meta key on save.
If you keep the fallback read, consider deletingdokan_commission_metaafter persisting the new key to avoid ambiguity.
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
✏️ Tip: You can customize this high-level summary in your review settings.