Custom admin column disappearing when using Quick Edit [duplicate]

I’m using Tom McFarlin’s Plugin Boilerplate for the plugins I write and in the main plugin file, there is a conditional statement to keep things as light as possible in the admin:

if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
  ...
}

Since the Quick Edit feature uses AJAX, the column wasn’t being recreated on a Quick Edit save. Changing the above line to:

if ( is_admin() ) {
  ...
}

solved the problem and the custom column appears when saving via Quick Edit.

Hopefully this helps someone who might run into the same type of issue.

Thanks.

Leave a Comment