Why does this code snippet create a critical error on my site? [closed]

On this line in bulk_process_status_printed():

'ids' => join( $_REQUEST['post'], ',' ),

you’ve got the arguments backwards: it should be join(separator, array):

'ids' => join( ',', $_REQUEST['post'] ),

This is actually a PHP 8 change not WordPress 6

8.0.0 – Passing the separator after the array is no longer supported.