Undefined variable post_id in custom quick edit coloumn

Sorry, I’ve had to change my answer after checking the WordPress Codex on adding custom editable data to the quick edit. So you’ll have to remove the references to $post_id too (from the add_action arguments and from within your function).

It looks like the quick_edit_custom_box only takes 2 arguments: $column_name and $post_type. Then for getting and displaying the value, this has to be done using some more PHP and Javascript.

If you read further in to the WordPress Codex on the quick edit custom box and read further down to the section on ‘Setting Existing Values‘, you’ll see there’s a fair bit more work required in order to do this.

I’d suggest reading the docs in a bit more detail as it’s not quite as straight-forward as I first thought…