Repository navigation
Remove the duplicated Variant SKU entry in the Shopify importer mapping - #68226
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughRemoved the duplicate ChangesShopify importer mapping cleanup
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This removes a redundant Shopify SKU mapping entry without changing the importer’s resulting mapping, so no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. ✨ 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 |
Testing GuidelinesHi , 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:
|
dilirity
left a comment
There was a problem hiding this comment.
Hi @darkdi, thanks for the cleanup - you're right that PHP keeps the first key position and the last value here, so dropping the duplicate is a safe no-op.
Two things before this can merge.
The description mentions a change file, but the diff only has shopify.php - please run pnpm --filter=@woocommerce/plugin-woocommerce changelog add from the repo root (patch significance, dev type) and commit the file it creates under plugins/woocommerce/changelog/, otherwise the "Validate changelog" job will fail once full CI runs.
Also please update the description to follow the PR template - ticking its milestone checkbox clears the failing "Ensure milestone is or will be assigned" check, and since the change has no observable behavior difference, the "How to test" section can just say so.
Once those are in we're good to go.
|
Both done. The change file is in as |
|
PHPStan was failing because it already knew about this one. The duplicate sits in Dropped that entry from the baseline in the same branch. Nothing else in the file moved, the six lines removed are only the shopify.php block. |
Submission Review Guidelines:
Changes proposed in this Pull Request:
'Variant SKU' => 'sku'is listed twice in the Shopify importer mapping, once at the top of the array and once seven lines down. PHP keeps the first position and the last value for a repeated key, and both values here are the same, so the mapping the importer ends up with does not change. It is just a line that reads as if a second column were being mapped.How to test the changes in this Pull Request:
There is nothing observable to test. The array
wc_importer_shopify_mappings()returns is identical before and after, both in values and in key order, because the removed line was the losing duplicate of one that stays.sku.Testing that has already taken place:
None beyond reading the array. The change removes a line that PHP was already discarding.
Milestone
Changelog entry
Added by hand as
plugins/woocommerce/changelog/fix-duplicate-shopify-variant-sku-mapping, patch significance and dev type, since the automatic job cannot push into a fork branch.