Title: Sync Function
Last modified: September 14, 2020

---

# Sync Function

 *  Resolved [forgetme](https://wordpress.org/support/users/forgetme/)
 * (@forgetme)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sync-function/)
 * Hi,
    Is there a function that I can call to set a product ID to be synced? I 
   have a script that runs against a product to make products visible in my store
   and I don’t want them synced with Facebook until they are visible, so I need 
   a function to enable Facebook syncing once I make the products visible to all
   users.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Marcus, SkyVerge Support](https://wordpress.org/support/users/marcusskyverge/)
 * (@marcusskyverge)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sync-function/#post-13420019)
 * Hi [@forgetme](https://wordpress.org/support/users/forgetme/),
 * Thanks for reaching out. Happy to help you with this!
 * I reached out to one of our support engineers to see if this is possible, and
   we have a custom code snippet that should do what you’re looking for here, so
   I’m happy to share it! However, please be aware of a couple notes:
    - I’m afraid that customizations are not covered under [our support policy](https://woocommerce.com/support-policy/),
      so implementing this directly or modifying it further isn’t something we can
      assist with.
    - Please be sure you know how to add custom code to your site. Personally, I
      like [the free Code Snippets plugin](https://wordpress.org/plugins/code-snippets/)
      method.
 * You can view the snippet here:
    [https://gist.github.com/simonporter007/2ca45aee42ecc4607a77370fb2199823#file-sv_facebook_for_woocommerce_sync_stock_status_updates_to_facebook_immediately-php](https://gist.github.com/simonporter007/2ca45aee42ecc4607a77370fb2199823#file-sv_facebook_for_woocommerce_sync_stock_status_updates_to_facebook_immediately-php)
 * You’ll need to make sure that you can pass in the `$product` to the function 
   and change the action for when this is run.
 * Would you please give this a try and let me know if it works for you?
 * Thanks,
    Marcus
 *  [Marcus, SkyVerge Support](https://wordpress.org/support/users/marcusskyverge/)
 * (@marcusskyverge)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/sync-function/#post-13463609)
 * Hey [@forgetme](https://wordpress.org/support/users/forgetme/),
 * It has been a while since we heard from you, so I’m going to mark this topic 
   as resolved. If you’re still experiencing issues please [take a look at our documentation](https://docs.woocommerce.com/document/facebook-for-woocommerce/)
   for more information and [create a new thread](https://wordpress.org/support/plugin/facebook-for-woocommerce/#new-topic-0)
   if you have further questions.
 * Thanks,
    Marcus

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Sync Function’ is closed to new replies.

 * ![](https://ps.w.org/facebook-for-woocommerce/assets/icon.svg?rev=3469606)
 * [Meta for WooCommerce](https://wordpress.org/plugins/facebook-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-for-woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Marcus, SkyVerge Support](https://wordpress.org/support/users/marcusskyverge/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/sync-function/#post-13463609)
 * Status: resolved