duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
146 stars 40 forks source link

[6.x] Fix augmentation of Status Log fieldtype when using Database Orders #1014

Closed duncanmcclean closed 7 months ago

duncanmcclean commented 7 months ago

In #983, I changed it so the order status log is stored in a separate database table from the actual orders for querying/performance reasons.

However, in testing something else, I realised that after that change, the HasMany relationship was being passed in as the $value to the Status Log fieldtype's augment method which caused an issue when trying to augment the status log since it's expecting an array of arrays instead.

This PR fixes that by transforming the HasMany relationship into the right format of arrays that the fieldtype can augment.

github-actions[bot] commented 7 months ago

Released as part of v6.0.6.