Skip to content

PaymentInfo::get_meta() results in empty string due to get_post_meta() fallback #163

@rvdsteege

Description

@rvdsteege

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 to get_post_meta(), which results in an empty string instead of null value if there is no meta stored for the given meta key.

/**
* Get the meta value of this specified meta key.
*
* @param string $key Meta key.
* @return mixed
*/
public function get_meta( $key ) {
if ( \array_key_exists( $key, $this->meta ) ) {
return $this->meta[ $key ];
}
if ( null === $this->id ) {
return null;
}
$key = $this->meta_key_prefix . $key;
return get_post_meta( $this->id, $key, true );
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions