Draft
Fix per-job cron schedule reverting when it matches the global default#1265
Conversation
Copilot
AI
changed the title
[WIP] Fix per-job cron schedule reverting to global default
Fix per-job cron schedule reverting when it matches the global default
Jun 24, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates Feedzy’s import-job meta saving behavior so a per-import cron schedule selection is no longer discarded when it matches the global default, ensuring the chosen value persists across reloads.
Changes:
- Stop unsetting
fz_cron_schedulewhen it equals the global schedule; only unset when the value is empty.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+669
to
671
| if ( empty( $data_meta['fz_cron_schedule'] ) ) { | ||
| unset( $data_meta['fz_cron_schedule'] ); | ||
| } |
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.
When a per-import cron schedule was set to the same value as the global default, it was silently discarded on save and the import fell back to "Once Daily" on reload.
Root cause
save_feedzy_import_feed_meta()unsetfz_cron_schedulenot only when empty, but also when it equalled the global schedule value — meaning an explicit per-job selection was never persisted if it happened to match the global setting.Changes
includes/admin/feedzy-rss-feeds-import.php— Remove the global-schedule equality check from the per-job schedule unset condition; the meta is now only discarded when empty, preserving any explicit per-job value regardless of what the global default is.