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

Broadcasts: DISABLE_WP_CRON notice #725

Merged
merged 3 commits into from
Oct 21, 2024
Merged

Conversation

n7studios
Copy link
Contributor

Summary

Adds a notice in the Broadcasts settings of the Plugin if the DISABLE_WP_CRON constant is detected. This was the reason for this issue, where broadcasts were not importing for the creator.

Screenshot 2024-10-17 at 15 57 45

The WordPress Cron system is essential for importing broadcasts. Normally, it's triggered by site activity, such as visitors or user logins. However, some web hosts disable this default behavior by specifying the DISABLE_WP_CRON constant, opting instead to trigger it via crontab or similar methods (see more: https://help.dreamhost.com/hc/en-us/articles/360048323291-Disabling-WP-CRON-to-Improve-Overall-Site-Performance).

The notice prompts creators to either ensure that their host is handling WordPress Cron manually or to remove the DISABLE_WP_CRON constant if Cron is not being triggered.

Testing

Existing tests pass.

Checklist

@n7studios n7studios self-assigned this Oct 17, 2024
@n7studios n7studios requested review from a team, noelherrick and jenessawhite and removed request for a team October 17, 2024 12:51
@n7studios n7studios marked this pull request as ready for review October 17, 2024 12:51
Copy link
Contributor

@noelherrick noelherrick left a comment

Choose a reason for hiding this comment

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

Is there an easy way to make this dismissable? No worries if not

@n7studios
Copy link
Contributor Author

Is there an easy way to make this dismissable? No worries if not

It's possible, but we'd have to store that the notice was dismissed. If the user removes DISABLE_WP_CRON, but later adds it back to their wp-config.php file, we've no way of telling them a second time that this could be a problem.

Given the notice is only displayed on the Broadcasts settings screen, I'd prefer to keep it displayed when the Plugin detects the DISABLE_WP_CRON constant is enabled for now. Happy to add support for dismissing the notice if there's an increase in support tickets about this not being dismissible.

@n7studios n7studios merged commit 948e894 into main Oct 21, 2024
77 checks passed
@n7studios n7studios deleted the broadcasts-disable-wp-cron-notice branch November 19, 2024 09:20
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.

2 participants