Skip to content

Conversation

@rachelmcr
Copy link
Contributor

@rachelmcr rachelmcr commented May 19, 2023

Closes: #8963
⚠️ UI changes depend on #9778

Description

This PR adds support on the Networking layer to set the parent on an OrderItem when the item is a component in a composite product (with the Composite Products extension).

Along with the UI changes in #9778, this displays the parent/child hierarchy for a composite product and its child components in order details.

Changes

  • In OrderItem, sets the parent property as either the bundled_by field (for a bundled item) or the composite_parent field (for a component).
  • Adds a mock response and test to confirm the composite_parent field is parsed correctly.

Testing instructions

  1. Create an order that includes a composite product.
  2. In the app, open the Orders tab and select the order.
  3. Confirm the composite product appears in the Products section with its components listed underneath and indented.

Screenshots

Before After
composite-before composite-after

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@rachelmcr rachelmcr added category: woo extensions Related to WC extensions or plugins. feature: woo express support Related to Woo Express support labels May 19, 2023
@rachelmcr rachelmcr added this to the 13.7 milestone May 19, 2023
@rachelmcr rachelmcr requested review from Ecarrion and ThomazFB May 19, 2023 19:10
@rachelmcr rachelmcr marked this pull request as ready for review May 19, 2023 19:10
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 19, 2023

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr9780-f0b72d1 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@spencertransier spencertransier modified the milestones: 13.7, 13.8 May 19, 2023
@rachelmcr rachelmcr linked an issue May 22, 2023 that may be closed by this pull request
@ThomazFB ThomazFB self-assigned this May 22, 2023
Copy link
Contributor

@ThomazFB ThomazFB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the same scenario of the previous PR, working just fine 👍

Evidence

Base automatically changed from issue/8962-product-bundle-ui to trunk May 23, 2023 08:00
@rachelmcr rachelmcr merged commit a214f22 into trunk May 23, 2023
@rachelmcr rachelmcr deleted the issue/8963-composite-product-hierarchy branch May 23, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: woo extensions Related to WC extensions or plugins. feature: woo express support Related to Woo Express support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Composite Products] Add a hierarchy below the composite product

5 participants