hotfix/cp-10640-add-scheduled-push-option-in-wordpress-plugin#13
Open
harkeshkumar196 wants to merge 2 commits intomasterfrom
Open
hotfix/cp-10640-add-scheduled-push-option-in-wordpress-plugin#13harkeshkumar196 wants to merge 2 commits intomasterfrom
harkeshkumar196 wants to merge 2 commits intomasterfrom
Conversation
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 12. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
de228f1 to
9551b87
Compare
184ea3a to
2c0119a
Compare
9551b87 to
bc4f610
Compare
- Add 'Notification delay (optional)' dropdown with immediate, 15/30/60/120/240 min options - Add 'Custom scheduled date & time' option for absolute scheduling - Calculate scheduledAt based on delay: time() + (delay_minutes * 60) - Store delay preference in cleverpush_notification_delay post meta - Update metabox UI to show delay options when 'Send push notification' is checked - Improve notification sent status messaging Co-authored-by: Cursor <cursoragent@cursor.com>
bc4f610 to
ea7211c
Compare
There was a problem hiding this comment.
2 issues found across 1 file
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cleverpush.php">
<violation number="1" location="cleverpush.php:1211">
P2: The delay values (15, 30, 60, 120, 240) are duplicated in `publish_post`, `save_post`, and the HTML template. This makes the code harder to maintain and prone to inconsistencies if options change.
Consider defining these as a class constant (e.g., `DELAY_OPTIONS`) and referencing it in all three locations.</violation>
<violation number="2" location="cleverpush.php:1219">
P2: This fallback logic overrides the "Immediately" selection if a scheduled date remains in the hidden input (e.g., due to a JavaScript error or a previous draft).
If the user selects "Immediately" (`cleverpush_notification_delay` is empty), the code shouldn't fall back to `cleverpush_scheduled_at` unless `cleverpush_notification_delay` was missing from the request entirely (legacy compatibility).
If `$_POST['cleverpush_notification_delay']` is present and empty, it should be treated as an explicit "send now" instruction.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Adds a “When to send” option in the WordPress CleverPush metabox so editors can schedule push notifications with preset delays or a custom date/time. Addresses Linear CP-10640 by setting scheduledAt on publish or resend based on the selected delay or custom timestamp, with minor UI copy and input handling fixes.
Written for commit 8e31c05. Summary will update on new commits.