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
The dashboard Renew action for an expired listing could lead directly to a checkout URL without a valid
checkout_type, displaying “Invalid checkout type.” The core renewal handler also published listings immediately, leaving no opportunity for admin approval.Renew now uses the authenticated renewal route and submits the listing as Pending Review. A renewal marker identifies listings awaiting approval. When a pending renewal is published, Directorist calculates
_expiry_datefrom the approval time using that listing directory's Default listing expiration days, clears the marker, and fires the renewal completion hook. The owner sees a submission-for-approval notice. The plain-permalink renewal query parameter is also corrected.Files changed:
includes/classes/class-add-listing.php— submit renewals for review and reset expiration when approved.includes/classes/class-permalink.php— correct the listing ID query key for plain permalink renewal URLs.includes/model/ListingDashboard.php— route dashboard Renew through the renewal handler and pass the pending notice state.templates/dashboard/notice.php— show the owner that renewal awaits approval.How to reproduce the issue or test the changes:
Local verification:
wp_insert_post; it calculated seven days and cleared the renewal marker. The test listing was restored to its prior expired state.php -lpassed for all four changed PHP files;git diff --check origin/development...HEADpassed.Notes:
Any linked issues
Checklist