Skip to content

Conversation

@petitphp
Copy link
Member

@petitphp petitphp commented Nov 4, 2025

Note

Use itemsReferencesAliases to resolve product references (ID/SKU) during order import, with improved logging and comprehensive HPOS/legacy tests and fixtures.

  • Orders/Import:
    • Use OrderResource::getItemsReferencesAliases() to map SF item references to WC product IDs/SKUs in Orders/Order/Products::set_products and mapping_product.
    • Include resolved reference in returned data as wc_ref; pass aliases to mapper.
    • Improve error message to show alias, original reference, and order ID.
  • Tests:
    • Add HPOS and legacy tests covering alias mapping for both ID and SKU, plus unknown-alias cases preventing order creation.
    • Add order fixture files: simple-order-*-reference-alias*.json (valid and invalid for ID/SKU).
    • Fix minor test name typo in ProductFeedTest.

Written by Cursor Bugbot for commit 5dccbd7. This will update automatically on new commits. Configure here.

@petitphp petitphp merged commit 464894d into develop Nov 12, 2025
2 of 3 checks passed
@petitphp petitphp deleted the issue/84660 branch November 12, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants