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 "Recursion detected" error with cart endpoints #1025

Closed duncanmcclean closed 7 months ago

duncanmcclean commented 7 months ago

This pull request fixes an issue where a "Recursion detected" error would occur when using the Database Driver & when expecting a JSON response from the server.

This PR fixes it by shallowly augmenting nested fields, like the customer field. Otherwise, Statamic would go round in circles looking at an order, its customer, its customer's orders, the customer of all the customer's orders, etc.

Fixes #1024.

github-actions[bot] commented 7 months ago

Released as part of v6.0.9.