This hook can be used for doing some action before saving the values of the fields.
Parameters
1. $comment (type: WP_Comment object) – the object of the comment
2. $fieldsBeforeSave (type: array) – the fields’ values before saving
Usage
add_action("wpdiscuz_before_save_commentmeta", function ($comment, $fieldsBeforeSave) {
if (!empty($fieldsBeforeSave["custom_field_5d2300b6413ef"])) {
$value = $fieldsBeforeSave["custom_field_5d2300b6413ef"];
}
}, 10, 2);
Changelog
since 7.0.0 version
