skip to Main Content

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


  1. It looks like Woocommerce offers webhooks which would be the typical way to solve this kind of problem:

    1. Create a Cloud Function that can receive a request every time an order status changes.
    2. Make the function write to Firestore with details about the order status.
    3. Configure the webhook in Woocommerce to point to the Cloud Function’s URL.
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search