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

Disable coming soon upon plugin deactivation #6

Merged
merged 4 commits into from
Jan 11, 2024
Merged

Conversation

wpalani
Copy link
Member

@wpalani wpalani commented Jan 9, 2024

This ticket aims to address this internal ticket: https://jira.newfold.com/projects/PRESS1/issues/PRESS1-122

The ticket asks that on plugin deactivation, we should:

  1. Check if coming soon is already on.
  2. Send site_launched event.
  3. Disable coming soon (database option).
  4. Deactivate.

I initially added the code to do the above entirely, but as I was testing, I found out that the data module already sends the site_launched event upon mm_coming_soon value change to 'false' https://github.com/newfold-labs/wp-module-data/blob/main/includes/Listeners/BluehostPlugin.php#L39-L52

So, just disabling coming soon is enough to send the event. However, I kept the event code on there but commented out the function call since the code in this can be used later for future events.

Open to ideas as well.

@wpalani wpalani requested a review from wpscholar January 10, 2024 21:48
@wpalani wpalani merged commit e88fb69 into main Jan 11, 2024
6 checks passed
@wpscholar wpscholar deleted the add/coming-soon branch February 5, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants