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): allow all gateway assets #1988

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

chickenn00dle
Copy link
Contributor

@chickenn00dle chickenn00dle commented Dec 6, 2024

All Submissions:

Changes proposed in this Pull Request:

This PR makes it so modal checkout allows all scripts and styles from available payment gateways by default.

How to test the changes in this Pull Request:

  1. Set up paypal payments
  2. Open modal checkout and get to the payments step
  3. Confirm paypal scripts are loading (smart buttons should be present or you can check for ppcp scripts/styles via network dev tools tab)

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?

@chickenn00dle chickenn00dle force-pushed the fix/allow-gateway-scripts-in-modal-checkout branch from 6767111 to 2dd48b8 Compare December 6, 2024 20:50
*
* @var string[]
*/
private static $allowed_styles = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I separated these out so we can be more explicit with our hooks but wasn't sure which of these were for scripts and which were for styles. Since this is time sensitive I didn't want to let this hold up this PR.

@chickenn00dle chickenn00dle marked this pull request as ready for review December 6, 2024 21:31
@chickenn00dle chickenn00dle requested a review from a team as a code owner December 6, 2024 21:31
@chickenn00dle chickenn00dle force-pushed the fix/allow-gateway-scripts-in-modal-checkout branch from 312773b to 95d58a0 Compare December 6, 2024 21:47
Copy link
Contributor

@laurelfulford laurelfulford left a comment

Choose a reason for hiding this comment

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

Looks good! I'm getting both the regular PayPal button plus other ones when enabled (like Google)!

CleanShot 2024-12-06 at 13 54 24

@chickenn00dle chickenn00dle merged commit e371e30 into trunk Dec 6, 2024
8 checks passed
@chickenn00dle chickenn00dle deleted the fix/allow-gateway-scripts-in-modal-checkout branch December 6, 2024 21:59
Copy link

github-actions bot commented Dec 6, 2024

Hey @chickenn00dle, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Dec 6, 2024
# [4.5.0-alpha.3](v4.5.0-alpha.2...v4.5.0-alpha.3) (2024-12-06)

### Bug Fixes

* **modal-checkout:** allow all gateway assets ([#1988](#1988)) ([e371e30](e371e30))
* **modal-checkout:** handle paypal ([#1985](#1985)) ([9bb2b8c](9bb2b8c))

### Features

* add CSS class to variation buttons for tracking ([#1989](#1989)) ([910e6b1](910e6b1))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.5.0-alpha.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Dec 9, 2024
# [4.5.0](v4.4.0...v4.5.0) (2024-12-09)

### Bug Fixes

* also search for coauthor posts by term slug ([#1954](#1954)) ([49357ff](49357ff))
* **modal-checkout:** allow all gateway assets ([#1988](#1988)) ([e371e30](e371e30))
* **modal-checkout:** handle paypal ([#1985](#1985)) ([9bb2b8c](9bb2b8c))
* **ras-acc:** correct spacing issue around saved credit cards ([#1980](#1980)) ([52a5c57](52a5c57))
* **ras-acc:** fix display issues with Additional Fields ([#1979](#1979)) ([b9390ef](b9390ef))
* **ras-acc:** remove space caused by empty divs ([#1978](#1978)) ([8cb6ead](8cb6ead))
* remove reCaptcha for WooCommere code from modal checkout ([#1984](#1984)) ([8e250eb](8e250eb))

### Features

* add Bluesky support to the Author Profile, List blocks ([#1969](#1969)) ([d26a7e4](d26a7e4))
* add CSS class to variation buttons for tracking ([#1989](#1989)) ([910e6b1](910e6b1))
* add support for Newspack Guest Contributor in HPP blocks ([#1934](#1934)) ([c16849e](c16849e))
* merge RAS-ACC work into trunk ([#1977](#1977)) ([2eeaa89](2eeaa89))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.5.0 🎉

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.

4 participants