Closed DCSnip3r closed 3 years ago
The source of truth for the product data is meant to be in Stripe. In order to keep things properly in sync we make sure we always mirror the product data from Stripe to Cloud Firestore. Is there any reason why you can't use the metadata on the Stripe objects for your custom data?
There are two main problems with having Stripe being the full source of truth:
1) Stripe metadata does not support all Firestore data types, such as Geopoint and Reference. 2) The prefix 'stripemetatadata' that is applied to each user-defined field is cumbersome and makes reading & de-structuring Firestore documents more bulky and difficult
Fair. This has been changed as of version 0.1.12: https://github.com/stripe/stripe-firebase-extensions/blob/next/firestore-stripe-subscriptions/CHANGELOG.md#version-0112---2021-04-29
You can update the extension in your Firebase console to enable this.
Bug report
firestore-stripe-subscriptions
]Describe the bug
Updating product details on the stripe dashboard, such as adding an image to a product, will overwrite the current firestore product document and will erase any custom fields. This is perhaps due to the webhooks using .set() without {merge : true}, or not using .update()
To Reproduce
Expected behavior
This extension should not overwrite any user-defined fields
System information
n/a