impress-org / givewp

GiveWP - The #1 Donation Plugin for WordPress. Easily accept donations and fundraise using your WordPress website.
https://givewp.com/
GNU General Public License v3.0
340 stars 191 forks source link

Migration fixing onboarding form should not remove donation level meta #5949

Closed JasonTheAdams closed 2 years ago

JasonTheAdams commented 3 years ago

Details

A faulty migration was introduced via https://github.com/impress-org/givewp/pull/5941 in 2.13.3. When the migration runs, it is intended to fix incorrect donation level meta in the form generated via onboarding. Unfortunately, the migration doesn't take into account additional meta that may be present in the array structure added later by the admin. This migration should be tweaked to handle this additional meta.

As a side note, this is why storing serialized arrays that have no corresponding object (DTO or otherwise) are dangerous. When viewing the serialized array, there's absolutely no indication as to the intended shape of the data — whether there may be more keys than present.

Acceptance Criteria

ravinderk commented 2 years ago

This has been resolved.