Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly allow setting a null expiration date via pmpro_set_expiration_date(). #3098

Conversation

ZebulanStanphill
Copy link
Contributor

@ZebulanStanphill ZebulanStanphill commented Jul 31, 2024

All Submissions:

Changes proposed in this Pull Request:

pmpro_set_expiration_date() already works with null values (since $wpdb->update() already works with them), but the PHPDocs do not reflect this. Seeing as that the alternative of zero-dates is not recommended, I think it would be good to officially support passing null to the enddate parameter of this function.

How to test the changes in this Pull Request:

There's not really anything to test, functionality-wise. This just makes static analysis tools like PHPStan/Psalm stop complaining when you pass null as the enddate argument in pmpro_set_expiration_date().

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

Officially support passing null as enddate argument in pmpro_set_expiration_date().

@dparker1005 dparker1005 merged commit e0ee499 into strangerstudios:dev Aug 2, 2024
@ZebulanStanphill ZebulanStanphill deleted the update/set-expiration-date-signature branch August 31, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants