Skip to content
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

fix(modal-checkout): ensure customer location when state is required but country is not #1683

Merged
merged 2 commits into from Mar 4, 2024

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Mar 1, 2024

All Submissions:

Changes proposed in this Pull Request:

Alternative version of Automattic/newspack-plugin#2960, but isolated only to modal checkout instances.

How to test the changes in this Pull Request:

Follow testing instructions ins Automattic/newspack-plugin#2960

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Contributor

@chickenn00dle chickenn00dle left a comment

Choose a reason for hiding this comment

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

Nice! This works for me @dkoo

Just one issue then this is good to go 👍

}

// If billing state is required but billing country is not, we need to ensure a default location is set.
$billing_fields = get_option( Donations::DONATION_BILLING_FIELDS_OPTION, [] );
Copy link
Contributor

Choose a reason for hiding this comment

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

Donations::DONATION_BILLING_FIELDS_OPTION lives in the main plugin so we will need to do a check to confirm this is active here, then properly namespace it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, a victim of copy/paste syndrome! Fixed in 9c92297

@dkoo dkoo requested a review from chickenn00dle March 1, 2024 22:56
@dkoo dkoo merged commit 27badf8 into trunk Mar 4, 2024
8 checks passed
@dkoo dkoo deleted the fix/ensure-default-country-when-state-only-required branch March 4, 2024 18:15
matticbot pushed a commit that referenced this pull request Mar 7, 2024
## [3.0.4-alpha.1](v3.0.3...v3.0.4-alpha.1) (2024-03-07)

### Bug Fixes

* correct carousel button styles in editor ([#1680](#1680)) ([d4aba73](d4aba73))
* **modal-checkout:** ensure customer location when state is required but country is not ([#1683](#1683)) ([27badf8](27badf8))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.0.4-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Mar 7, 2024
## [3.0.5-alpha.1](v3.0.4...v3.0.5-alpha.1) (2024-03-07)

### Bug Fixes

* **author-profile:** only display guest author profile when linked ([#1688](#1688)) ([ee1bb21](ee1bb21))
* correct carousel button styles in editor ([#1680](#1680)) ([d4aba73](d4aba73))
* **modal-checkout:** ensure customer location when state is required but country is not ([#1683](#1683)) ([27badf8](27badf8))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.0.5-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Mar 25, 2024
## [3.0.5](v3.0.4...v3.0.5) (2024-03-25)

### Bug Fixes

* **author-profile:** only display guest author profile when linked ([#1688](#1688)) ([ee1bb21](ee1bb21))
* correct carousel button styles in editor ([#1680](#1680)) ([d4aba73](d4aba73))
* **modal-checkout:** ensure customer location when state is required but country is not ([#1683](#1683)) ([27badf8](27badf8))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.1.0-epic-ras-acc.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants