Code is not tested. But theoretically it should work:
add_filter('comment_form_defaults', 'wpse337366_comment_form_modification');
function wpse337366_comment_form_modification($defaults)
{
// put your condition here
if( is_page('my-page') || is_singular('my_post_type') )
{
$defaults['title_reply'] = __('Leave a Review');
}
return $defaults;
}
You can place the code in a plugin or your theme’s functions.php
.
The code will filter the default texts passed to the comment_form()
.