After purchasing a shipping label, the app always defaults to the legal paper size, even if the user has set a different default paper size in the Shipping settings in wp-admin.
This happens because we only check for the default paper size setting on the shipping label settings, but a new label doesn't have any default settings. For a newly purchased label, we should be checking the account settings for the default.
Related discussion: p1726218332825849-slack-C05VBLKHHV1
To Reproduce
Steps to reproduce the behavior:
Ensure the WooCommerce Shipping & Tax or WooCommerce Shipping extension is installed and set up on your store.
Create an order with the processing status and at least one physical product.
In the order details, tap the "Create Shipping Label" button.
Complete the shipping label flow and purchase the label.
After the purchase is complete, on the "Print Shipping Label" screen, notice that the default paper size is Legal.
Screenshots
In the app, after purchasing a label:
In wp-admin:
Expected behavior
After purchasing a shipping label, the app should default to the default paper size in the shipping account settings (ShippingLabelAccountSettings.paperSize).
For existing shipping labels, I believe the priority should be:
Default paper size setting for the shipping label (ShippingLabelSettings.paperSize)
If there isn't a default for the shipping label, fall back to the account settings (ShippingLabelAccountSettings.paperSize)
If there isn't a default in the account settings, fall back to a default option
However, I'd suggest we default to label or letter size in the last case, rather than legal (which seems like an odd default).
Given that this doesn't break the user flow (they can still select the paper they want), and that we're currently revamping this flow adding the requested enhancement, I move this to Inbox.
Describe the bug
After purchasing a shipping label, the app always defaults to the legal paper size, even if the user has set a different default paper size in the Shipping settings in wp-admin.
This happens because we only check for the default paper size setting on the shipping label settings, but a new label doesn't have any default settings. For a newly purchased label, we should be checking the account settings for the default.
Related discussion: p1726218332825849-slack-C05VBLKHHV1
To Reproduce Steps to reproduce the behavior:
processing
status and at least one physical product.Screenshots
In the app, after purchasing a label:
In wp-admin:
Expected behavior
After purchasing a shipping label, the app should default to the default paper size in the shipping account settings (
ShippingLabelAccountSettings.paperSize
).For existing shipping labels, I believe the priority should be:
ShippingLabelSettings.paperSize
)ShippingLabelAccountSettings.paperSize
)However, I'd suggest we default to label or letter size in the last case, rather than legal (which seems like an odd default).