woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
301 stars 109 forks source link

[Shipping labels] Default label paper size setting not being used when printing shipping labels #13958

Open rachelmcr opened 1 month ago

rachelmcr commented 1 month ago

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:

  1. Ensure the WooCommerce Shipping & Tax or WooCommerce Shipping extension is installed and set up on your store.
  2. Create an order with the processing status and at least one physical product.
  3. In the order details, tap the "Create Shipping Label" button.
  4. Complete the shipping label flow and purchase the label.
  5. 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:

Screenshot 2024-09-13 at 12 06 42

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:

  1. Default paper size setting for the shipping label (ShippingLabelSettings.paperSize)
  2. If there isn't a default for the shipping label, fall back to the account settings (ShippingLabelAccountSettings.paperSize)
  3. 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).

dangermattic commented 1 month ago

Thanks for reporting! 👍

toupper commented 2 weeks ago

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.