duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/simple-commerce
Other
143 stars 34 forks source link

[7.x] Fix error when querying customers stored as database users #1088

Closed duncanmcclean closed 1 month ago

duncanmcclean commented 1 month ago

This pull request fixes an error when querying customers when they're stored as database users.

Essentially, the raw items that come back from the query builder are User models instead of Statamic user instances as expected. This PR fixes it by mapping the models to Statamic User instances before then mapping to Simple Commerce Customer objects.

Fixes #1082.

github-actions[bot] commented 1 month ago

Released as part of v7.2.1.