Closed rvdsteege closed 9 months ago
Discussed with @remcotolsma at HQ. We'll resolve this by retrieving post meta with the $single
parameter set to false
and checking the number of results. For 0
results, we'll return null
in PaymentInfo::get_meta()
.
We may need to check type, since get_post_meta
returns mixed
: https://developer.wordpress.org/reference/functions/get_post_meta/.
With all the filters in the meta functions you are never sure what it will return.
I could remember us doing something similar somewhere:
An 'empty' check as above might also be workable for now?
There is an issue with starting first payments with some integrations since the Pronamic Pay 9.6 release. This has to do with recent changes in setting the Mollie sequence type:
The underlying issue is
PaymentInfo::get_meta()
falling back toget_post_meta()
, which results in an emptystring
instead ofnull
value if there is no meta stored for the given meta key.https://github.com/pronamic/wp-pay-core/blob/a6f6c6cd2379f6c4b292804e7225e7101cc43cca/src/Payments/PaymentInfo.php#L440-L458