Facebook-for-woocommerce: Integrate WOOCOMMERCE REST API w/ Facebook Sync Product

Created on 30 Jan 2018  路  10Comments  路  Source: facebookincubator/facebook-for-woocommerce

When creating products through the Woocommerce Rest API Product does not Sync to Facebook.
In order to Sync to Facebook requires going into the product edit page and click update on each product.

Which action should be triggered after Creating a product through Woocommerce Rest API.

feature-request help wanted

Most helpful comment

Hi,

Thanks for reporting this. There may be a hook we can add so that the rest API also updates the products on FB. I'm not sure where that is offhand, but we can probably figure it out and add it, though I've marked this as help-wanted since I don't think we will get to this soon, so it would be great if anyone wants to send a pull request.

I would recommend doing Force Resync after a large # of API updates, this should pick up any new products added through the API.

All 10 comments

Hi @bmardock ,

To create a product, we add action here. I don't think the rest api approach will reach this line.

Also when trying to sync products via admin from :
Woocommerce > Integration > Facebook Integration

The status shows:
Status: Products are synced to Facebook.

However, there are a number of newly added products without a facebook id.

Is there any work around you guys can recommend other then manually updating each product from the admin edit?

Hi,

Thanks for reporting this. There may be a hook we can add so that the rest API also updates the products on FB. I'm not sure where that is offhand, but we can probably figure it out and add it, though I've marked this as help-wanted since I don't think we will get to this soon, so it would be great if anyone wants to send a pull request.

I would recommend doing Force Resync after a large # of API updates, this should pick up any new products added through the API.

Same issue. We鈥檙e adding new products every day. Would be very happy if it would also work with the api.

I recently updated my product save functionality to use Wordpress's wp_insert_post and update_post_meta methods vs the Rest API(way faster). However I still have the same issue of not being able to trigger the facebook id.

We'll consider to build support for REST API based on user demand and Engineer capacity, if anyone like this feature please vote here to help us understand priority. Unfortunately, we don't have the ETA now.

If anyone is interested, we'd be happy to review any pull request to add this functionality!

@mengyingdu can you provide any info on how we can trigger the product sync functionality outside of the Wordpress Admin UI.

@bmardock
If you can trigger this hook
But it needs a global post id, so i don't think you can trigger that outside of the UI.

If you actually make it, would like to hear your sharing.

Thanks.

@mengyingdu Correct. This isn't exposed outside of the UI to my knowledge.
I was looking into if this could be triggered through admin-ajax.

Welcome to send us a pull request if you make it!

Was this page helpful?
0 / 5 - 0 ratings