function plt_hide_wpcf7_redirect_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Action Meta" meta box.
remove_meta_box('wpcf7r_action_meta', $screen->id, 'advanced');
//Hide the "Lead Details" meta box.
remove_meta_box('wpcf7r_leads', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_wpcf7_redirect_metaboxes', 20);