Can retrieve custom field for Parent Comment Author but not Comment Author
-
Hi. I’ve successfully created a merge tag which retrieves info from a custom field in wp_usermeta for the author of a parent comment:
$trigger->add_merge_tag( new BracketSpace\Notification\Defaults\MergeTag\StringTag( [
'slug' => 'parent_comment_author_custom_data',
'name' => __( 'Parent Author CUSTOM DATA', 'textdomain' ),
'resolver' => function( $trigger ) {
return get_user_meta( $trigger->parent_comment_user_object->ID, 'MYCUSTOMFIELD', true );
},
] ) );I haven’t been able to work out how to retrieve the same field for the immediate comment author. Could anyone please help me work out the right structure for that last line?
- The topic ‘Can retrieve custom field for Parent Comment Author but not Comment Author’ is closed to new replies.