Welcome to Stack exchange 🙂
Some other plugin ( or your plugin elsewhere ) may be getting executed later, and maybe adding some elements to the array.
Try to give your hook a higher priority, replacing your tweak
method with following…
function tweak()
{
foreach( $this->get_post_types('objects') as $type => $data) {
if($this->setting('disable_bulk_' . $type))
{
if ( ! empty( $data->rewrite['slug'] ) ) {
$type = $data->rewrite['slug'];
}
add_filter('bulk_actions-edit-' . $type, '__return_empty_array',999);
}
}
}
This should delay the execution you function.
Lemme know if that helps 🙂
Cheers
—————-EDIT————————
Gets post type objects
instead of default labels.
Uses slug instead of post type name when slug is defined ( and not empty ) in post type object.