$wpdb doesn’t like to store arrays

Don’t store serialised PHP data in the database! It can be a major security risk!

When the contents of the value are deserialised, any objects get recreated and their constructors and wakeup methods run, this can be used to launch an attack.

Additionally, that data can’t be search replaced, because PHP serialised strings contain values for data lengths that don’t get changed, generating fatal errors when deserialised if modified

So instead:

  • Consider JSON instead
  • Store separate values as separate values, multiple rows, separate columns etc