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: remove OneSignal script from the modal checkout #2029

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

laurelfulford
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

The OneSignal signup bell shows in the modal checkout; it shouldn't be loaded there.

See 1200550061930446-as-1209206364302813

How to test the changes in this Pull Request:

  1. Install the OneSignal plugin and sign up for a free account.
  2. Connected the account to your site (you have to fill out some forms and the site's URL, then copy the OneSignal App ID and OneSignal REST API Key to the WP Admin > One Signal page on your website.
  3. In your OneSignal account, navigate to Settings > Push Platforms > Web, and add a Subscription Bell prompt under "Permission Prompt Setup".
  4. View your site and confirm you have the little Subscription bell in the bottom right corner.
  5. Run through a checkout using the modal checkout, and confirm the bell also appears there:

CleanShot 2025-01-22 at 12 25 45

  1. Apply this PR.
  2. Repeat steps 4-5 and confirm the bell still shows on regular pages, but not in the modal checkout.

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?

@@ -947,6 +947,16 @@ public static function remove_hooks() {
]
);
}
if ( is_plugin_active( 'onesignal-free-web-push-notifications/onesignal.php' ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to check for the active plugin here... if it's not, the hook will not be registered, nothing will be removed, and everything will be fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good call, thanks @leogermani! I removed this check in 20f00c7 🙂

@laurelfulford
Copy link
Contributor Author

Thanks @leogermani!

@laurelfulford laurelfulford merged commit 343ca5e into trunk Jan 30, 2025
9 checks passed
@laurelfulford laurelfulford deleted the fix/remove-onesignal-from-modal branch January 30, 2025 18:45
Copy link

Hey @laurelfulford, 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 Feb 7, 2025
# [4.6.0-alpha.1](v4.5.10...v4.6.0-alpha.1) (2025-02-07)

### Bug Fixes

* enforce the password strength on checkout ([#2037](#2037)) ([b9dcf03](b9dcf03))
* make sure membership gate refreshes after variation purchase ([#2044](#2044)) ([1555b0f](1555b0f))
* remove OneSignal script from the modal checkout ([#2029](#2029)) ([343ca5e](343ca5e))
* return no posts for authors without term ([#2033](#2033)) ([e331139](e331139))

### Features

* **homepage-articles:** rename block and reorganise settings ([#2000](#2000)) ([841de19](841de19))
* rename all homepage posts patterns to content loop patterns ([#2046](#2046)) ([9b6bdee](9b6bdee))
@matticbot
Copy link
Contributor

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

The release is available on:

Your semantic-release bot 📦🚀

dkoo added a commit that referenced this pull request Feb 11, 2025
…2028)

* fix(recaptcha): use clone of #place_order button to trigger checkout

* chore: delete unwanted file

* fix(recaptcha): don't create button clone if not using v2

* fix: make sure fields after floated inputs clear floats in the modal checkout (#2030)

* chore(release): 4.5.6 [skip ci]

## [4.5.6](v4.5.5...v4.5.6) (2025-01-23)

### Bug Fixes

* make sure fields after floated inputs clear floats in the modal checkout ([#2030](#2030)) ([274b4d4](274b4d4))

* build(deps-dev): bump @testing-library/user-event from 14.6.0 to 14.6.1

Bumps [@testing-library/user-event](https://github.com/testing-library/user-event) from 14.6.0 to 14.6.1.
- [Release notes](https://github.com/testing-library/user-event/releases)
- [Changelog](https://github.com/testing-library/user-event/blob/main/CHANGELOG.md)
- [Commits](testing-library/user-event@v14.6...v14.6.1)

---
updated-dependencies:
- dependency-name: "@testing-library/user-event"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump lint-staged from 15.4.1 to 15.4.3

Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.4.1 to 15.4.3.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v15.4.1...v15.4.3)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: return no posts for authors without term (#2033)

* fix: remove OneSignal script from the modal checkout (#2029)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Laurel <laurel.fulford@automattic.com>
Co-authored-by: matticbot <semantic-release-bot@martynus.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: leogermani <leogermani@automattic.com>
matticbot pushed a commit that referenced this pull request Feb 17, 2025
# [4.6.0](v4.5.10...v4.6.0) (2025-02-17)

### Bug Fixes

* enforce the password strength on checkout ([#2037](#2037)) ([b9dcf03](b9dcf03))
* make sure membership gate refreshes after variation purchase ([#2044](#2044)) ([1555b0f](1555b0f))
* remove OneSignal script from the modal checkout ([#2029](#2029)) ([343ca5e](343ca5e))
* return no posts for authors without term ([#2033](#2033)) ([e331139](e331139))

### Features

* **homepage-articles:** rename block and reorganise settings ([#2000](#2000)) ([841de19](841de19))
* rename all homepage posts patterns to content loop patterns ([#2046](#2046)) ([9b6bdee](9b6bdee))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.6.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.

3 participants