Is it possible to create a firestore document with the user ID and new order status as the fields when an order status is changed in woocommerce ? i would like to use this setup to trigger push notifications in my application using cloud functions.
Is it possible to create a firestore document with the user ID and new order status as the fields when an order status is changed in woocommerce ? i would like to use this setup to trigger push notifications in my application using cloud functions.
2
Answers
It looks like Woocommerce offers webhooks which would be the typical way to solve this kind of problem:
To create a Firestore document whenever an order status changes in WooCommerce, you can use the WooCommerce hook (e.g. woocommerce_order_status_changed) to trigger a Cloud Function provided by Firebase using a Firebase SDK.
There is a plugin called WordPress Firestore Integrator that provides this kind of sync. Not sure if it’s free or paid.