wordpress remove quick edit custom post type

Navigate to your WordPress dashboard and locate the "functions.php" file within your theme's directory. Open the file and add the following code:

function remove_quick_edit($actions) {
    unset($actions['inline']);
    return $actions;
}
add_filter('post_row_actions', 'remove_quick_edit', 10, 1);
add_filter('page_row_actions', 'remove_quick_edit', 10, 1);

Save the "functions.php" file and close it. This code removes the quick edit option from custom post types.