-
Notifications
You must be signed in to change notification settings - Fork 121
[Woo POS][Historical Orders] Order Details - Load product images #16073
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
Merged
staskus
merged 5 commits into
trunk
from
woomob-1138-woo-poshistorical-orders-order-details-image-loading
Sep 4, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8a5a2bf
Include image in OrderItem object
staskus cc2a704
Use imageSrc for PointOfSaleOrderDetailsView
staskus 8c6ae37
Remove unused code
staskus a802238
Remove unused initializer
staskus 4a438c6
Make OrderItemProductImage src optional to avoid decoding issues
staskus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 138 additions & 0 deletions
138
Modules/Tests/NetworkingTests/Responses/order-item-image.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,138 @@ | ||
| { | ||
| "data": [ | ||
| { | ||
| "id": 963, | ||
| "parent_id": 0, | ||
| "is_editable": true, | ||
| "needs_payment": true, | ||
| "needs_processing": true, | ||
| "number": "963", | ||
| "status": "processing", | ||
| "order_key": "abc123", | ||
| "currency": "USD", | ||
| "currency_symbol": "$", | ||
| "date_created_gmt": "2018-04-03T23:05:12", | ||
| "date_modified_gmt": "2018-04-03T23:05:14", | ||
| "discount_total": "30.00", | ||
| "discount_tax": "1.20", | ||
| "shipping_total": "0.00", | ||
| "shipping_tax": "0.00", | ||
| "cart_tax": "1.20", | ||
| "total": "31.20", | ||
| "total_tax": "1.20", | ||
| "customer_id": 11, | ||
| "customer_note": "", | ||
| "billing": { | ||
| "first_name": "Johnny", | ||
| "last_name": "Appleseed", | ||
| "company": "", | ||
| "address_1": "234 70th Street", | ||
| "address_2": "", | ||
| "city": "Niagara Falls", | ||
| "state": "NY", | ||
| "postcode": "14304", | ||
| "country": "US", | ||
| "email": "[email protected]", | ||
| "phone": "333-333-3333" | ||
| }, | ||
| "shipping": { | ||
| "first_name": "Johnny", | ||
| "last_name": "Appleseed", | ||
| "company": "", | ||
| "address_1": "234 70th Street", | ||
| "address_2": "", | ||
| "city": "Niagara Falls", | ||
| "state": "NY", | ||
| "postcode": "14304", | ||
| "country": "US", | ||
| "email": "[email protected]", | ||
| "phone": "333-333-3333" | ||
| }, | ||
| "shipping_lines": [], | ||
| "fee_lines": [], | ||
| "tax_lines": [], | ||
| "payment_method": "stripe", | ||
| "payment_method_title": "Credit Card (Stripe)", | ||
| "payment_url": "http://www.automattic.com", | ||
| "date_paid_gmt": "2018-04-03T23:05:14", | ||
| "date_completed_gmt": null, | ||
| "line_items": [ | ||
| { | ||
| "id": 1, | ||
| "name": "Product with valid image src", | ||
| "product_id": 123, | ||
| "variation_id": 0, | ||
| "quantity": 1, | ||
| "price": 10.0, | ||
| "sku": "", | ||
| "subtotal": "10.00", | ||
| "subtotal_tax": "0.00", | ||
| "tax_class": "", | ||
| "taxes": [], | ||
| "total": "10.00", | ||
| "total_tax": "0.00", | ||
| "meta_data": [], | ||
| "image": { | ||
| "src": "https://example.com/image.jpg" | ||
| } | ||
| }, | ||
| { | ||
| "id": 2, | ||
| "name": "Product with no image field", | ||
| "product_id": 124, | ||
| "variation_id": 0, | ||
| "quantity": 1, | ||
| "price": 10.0, | ||
| "sku": "", | ||
| "subtotal": "10.00", | ||
| "subtotal_tax": "0.00", | ||
| "tax_class": "", | ||
| "taxes": [], | ||
| "total": "10.00", | ||
| "total_tax": "0.00", | ||
| "meta_data": [] | ||
| }, | ||
| { | ||
| "id": 3, | ||
| "name": "Product with image but no src", | ||
| "product_id": 125, | ||
| "variation_id": 0, | ||
| "quantity": 1, | ||
| "price": 10.0, | ||
| "sku": "", | ||
| "subtotal": "10.00", | ||
| "subtotal_tax": "0.00", | ||
| "tax_class": "", | ||
| "taxes": [], | ||
| "total": "10.00", | ||
| "total_tax": "0.00", | ||
| "meta_data": [], | ||
| "image": { | ||
| "alt": "Product image alt text" | ||
| } | ||
| }, | ||
| { | ||
| "id": 4, | ||
| "name": "Product with wrong src type", | ||
| "product_id": 126, | ||
| "variation_id": 0, | ||
| "quantity": 1, | ||
| "price": 10.0, | ||
| "sku": "", | ||
| "subtotal": "10.00", | ||
| "subtotal_tax": "0.00", | ||
| "tax_class": "", | ||
| "taxes": [], | ||
| "total": "10.00", | ||
| "total_tax": "0.00", | ||
| "meta_data": [], | ||
| "image": { | ||
| "src": 12345 | ||
| } | ||
| } | ||
| ], | ||
| "coupon_lines": [], | ||
| "refunds": [] | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
👀 I'm guessing this was automatically generated on
rake generate, but I'm not sure why. Perhaps some other PR missed it? Since builds without the import, we could remove it from this PR.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.
Yes, it was added by
rake generate.Well.. it would re-appear with another
rake generateso probably not much value in removing it here.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.
I just noticed that the test target won't run locally unless we add this import via rake generate
Undefined symbol: NetworkingCore.AlamofireNetwork.__allocating_init(credentials: NetworkingCore.Credentials?, selectedSite: Combine.AnyPublisher<NetworkingCore.JetpackSite?, Swift.Never>?, sessionManager: Alamofire.Session?) -> NetworkingCore.AlamofireNetworkMust have sneaked through some other changes, still odd that CI has been passing.