We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AbstractDataStoreCPT::update_meta()
In the subscriptions data store, the $subscription->get_next_payment_date() can result in a null value (e.g. when a phase has a fixed number of periods and the last period has been reached). Updating the meta value with $this->update_meta( $id, 'next_payment', $subscription->get_next_payment_date() ) leaves the meta value unaffected, because there's an empty value check in https://github.com/pronamic/wp-pay-core/blob/3303f7f200796405e74b27f65a0965bad6fe5a77/src/AbstractDataStoreCPT.php#L228-L230
$subscription->get_next_payment_date()
null
$this->update_meta( $id, 'next_payment', $subscription->get_next_payment_date() )
I've now added an explicit check for the null value to delete the post meta:
Question: Should the AbstractDataStoreCPT::update_meta() method also be able to remove post meta if the new value is null?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the subscriptions data store, the
$subscription->get_next_payment_date()
can result in anull
value (e.g. when a phase has a fixed number of periods and the last period has been reached). Updating the meta value with$this->update_meta( $id, 'next_payment', $subscription->get_next_payment_date() )
leaves the meta value unaffected, because there's an empty value check in https://github.com/pronamic/wp-pay-core/blob/3303f7f200796405e74b27f65a0965bad6fe5a77/src/AbstractDataStoreCPT.php#L228-L230I've now added an explicit check for the
null
value to delete the post meta:Question: Should the
AbstractDataStoreCPT::update_meta()
method also be able to remove post meta if the new value isnull
?The text was updated successfully, but these errors were encountered: