Add description for COD enable_for_methods field in v4 settings API#63767
Add description for COD enable_for_methods field in v4 settings API#63767
Conversation
The enable_for_methods field in the COD gateway settings schema was missing a description (empty string). Add a concise description that explains the field's purpose, aligning with the design specifications.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit. |
Testing GuidelinesHi @woocommerce/moltres, Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
Motivation
The
enable_for_methodsfield in the COD (Cash on Delivery) payment gateway's v4 settings API schema was returning an empty description string. All other fields in the COD schema have descriptive help text that explains their purpose.This was identified while building the CIAB admin's COD settings page, where the description is displayed below the shipping methods selector.
Changes
Add a description to the
enable_for_methodsfield inCodGatewaySettingsSchema.php:This aligns with the design specifications and is consistent with how other fields in the schema provide contextual help text.
Testing
/wc/v4/settings/payment-gateways/codenable_for_methodsfield in thesettingsgroupdescis now"Choose which shipping methods support Cash on delivery."instead of an empty stringMilestone
Changelog entry
Changelog Entry Details
Significance
Type
Message
Add description for COD enable_for_methods field in v4 settings API.
Changelog Entry Comment
Comment