Conversation
supportI have some custom comment notifications I’m writing for a client. The function takes the comment ID and builds the notification content. I’m trying to incorporate information in the custom field, but nothing comes through. I expected to be able to use: get_comment_meta($comment_id, "field_key", true); But no data comes back. Was I right to expect this to work? Is the field data stored differently?
Hi, please use following code get_comment_meta($comment_id, "wpcomment_fields", true); and it will return meta as array with key value.
Thanks, that got me what I needed. To clarify, the return value contains a key fields with an array of the meta values.
Hi, please use following code get_comment_meta($comment_id, "wpcomment_fields", true); and it will return meta as array with key value.
Thanks, that got me what I needed. To clarify, the return value contains a key fields with an array of the meta values.