[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
Changes proposed in this Pull Request:
Fixes a regression introduced in https://github.com/Automattic/newspack-popups/pull/1305. For some reason, some posts did get expiration_date with empty value assigned. Unfortunately, there's no way to fix these (re-publish), since we can't know which prompts were supposed to be published or not in the first place.
How to test the changes in this Pull Request:
On release, assign empty value to a published prompt expiration_date meta
Run wp cron event run newspack_popups_check_expiry, observe the prompt has been reverted to draft
Switch to this branch, repeat, observe the prompt with invalid expiration_date is not reverted to draft
Other information:
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you written new tests for your changes, as applicable?
[x] Have you successfully ran tests with your changes locally?
To see the specific tasks where the Asana app for GitHub is being used, see below:
All Submissions:
Changes proposed in this Pull Request:
Fixes a regression introduced in https://github.com/Automattic/newspack-popups/pull/1305. For some reason, some posts did get
expiration_date
with empty value assigned. Unfortunately, there's no way to fix these (re-publish), since we can't know which prompts were supposed to be published or not in the first place.How to test the changes in this Pull Request:
release
, assign empty value to a published promptexpiration_date
metawp cron event run newspack_popups_check_expiry
, observe the prompt has been reverted to draftexpiration_date
is not reverted to draftOther information: