-
Notifications
You must be signed in to change notification settings - Fork 1
Detect site-url changes #634
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
Conversation
Test on Playground |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements site URL change detection functionality to notify the remote server when a WordPress site's URL has changed. This enables automatic updates to the database for newsletter registrations and other site-dependent data.
Key changes:
- Added site URL change detection that runs on WordPress shutdown hook
- Refactored remote URL handling to use a single parameterized method
- Updated references to use the new consolidated URL method
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
classes/utils/class-onboard.php | Added site URL change detection method and consolidated remote URL handling |
classes/admin/class-page.php | Updated to use the new parameterized remote URL method |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Detects site-url changes.
If the site URL has changed, makes a request to a new endpoint on our server.
That endpoint then updates the entry in our database for the newsletters etc.
Of course that only happens if the site is already registered to get newsletters.
Depends on https://github.com/ProgressPlanner/progress-planner-server/pull/47