duncanmcclean / simple-commerce

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

Prevent empty arrays from being saved when variants & variant options are empty #894

Closed duncanmcclean closed 1 year ago

duncanmcclean commented 1 year ago

This pull request prevents empty arrays from being saved in product entries when the variants & variant options are empty.

This is helpful if you want to have both a Product Variants field and a normal Price field in the same blueprint. Currently, if you do that, it'll presume it's a variant product because the product_variants field has a value (albeit empty arrays).

Closes #892

github-actions[bot] commented 1 year ago

Released as part of v5.3.3.