protected function searchForMetaValue( $meta_key, array $postmeta ) {

		if ( empty( $postmeta ) ) {
			return '';
		}

		foreach ( $postmeta as $meta ) {
			// prefer this value, if it's set
			if ( $meta_key === $meta['key'] ) {
				$meta_val = $meta['value'];
				if ( is_serialized( $meta_val ) ) {
					$meta_val = unserialize( $meta_val ); // @codingStandardsIgnoreLine
					if ( is_object( $meta_val ) ) {
						$meta_val = ''; // Hack attempt?
					}
				}
				return $meta_val;
			}
		}

		return '';
	}