add_action( 'nav_menu_css_class', 'yourprefix_cpt_child_current_menu_item_to_parent_link', 10, 2 );
/**
* add 'current-menu-item' to menu when on single entry of CPT
*
*/
function yourprefix_cpt_child_current_menu_item_to_parent_link( $classes, $item ) {
global $post;
$id = ( isset( $post->ID ) ? get_the_ID() : NULL );
if ( isset( $id ) ) :
$current_post_type = get_post_type_object( get_post_type( $post->ID ) );
$current_post_type_slug = $current_post_type->rewrite['slug'];
$menu_slug = strtolower( trim( $item->url ) );
if ( strpos( $menu_slug,$current_post_type_slug ) !== false) :
$classes[] = 'current-menu-item';
endif;
endif;
// Return the corrected set of classes to be added to the menu item
return $classes;
}