Conversation
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.
PR Type
What kind of change does this PR introduce?
Description
Directorist's listing-expiry cron fires the
directorist_update_listings_expired_status_query_argumentsfilter with an unintended trailing space. Extensions register the documented hook name without that space, so their query protections never run. In WooCommerce Pricing Plans, this allows a recurring-plan listing to be marked expired when its stored_expiry_datepasses even though its WooCommerce subscription is still active.This change removes the trailing space from the filter name. Registered extension callbacks can now exclude active recurring listings from the expiry query as intended.
Before
The recurring-plan listing is changed to Expired after the expiry cron runs.
After
The same scenario remains Published after the expiry cron runs because the extension filter is now applied.
How to reproduce the issue or test the changes:
directorist_update_listings_expired_status_query_arguments, such as Directorist - WooCommerce Pricing Plans._expiry_date.developmentbranch and confirm that the listing becomes expired because the extension callback is not invoked.Local verification:
php -l includes/classes/class-cron.phpATBDP_Cron::update_expired_status()against only that fixture. Before the change its status becameexpired; after the change it remainedpublish.git diff --checkNotes:
Any linked issues
Checklist
Files changed
includes/classes/class-cron.php— Corrects the expiry-query filter name so extension callbacks can protect recurring listings.