Automattic / newspack-blocks

Gutenberg blocks for the Newspack project.
205 stars 43 forks source link

fix(ras-acc): add styles for single country displayed #1843

Closed laurelfulford closed 1 month ago

laurelfulford commented 1 month ago

All Submissions:

Changes proposed in this Pull Request:

This PR fixes the display of countries in the modal checkout when you have your shop set to either ship or sell to only one country.

See: 1207817176293825-as-1207991235341043

How to test the changes in this Pull Request:

  1. On epic/ras-acc, navigate to WP Admin > WooCommerce > Settings, and set "Selling location(s)" and "Shipping location(s)" to a single country.
  2. Run through the modal checkout and note the appearance in the Billing and Shipping sections:

CleanShot 2024-08-16 at 15 33 03

  1. Apply this PR and run npm run build.
  2. Confirm the appearance of the single country in the modal checkout no longer has a required marker, and is unbolded:

CleanShot 2024-08-16 at 15 30 59

  1. Switch one or both of the dropdowns to show more than one country in the WooCommerce settings (either by removing the restriction, or by adding at least one more country to each).
  2. Confirm that the dropdown is shown, and it looks like the others with the "required" asterisk.

Other information:

laurelfulford commented 1 month ago

Thanks @chickenn00dle!