• Resolved DaveVerzijl

    (@daveverzijl)


    If I update the field Meta: _wc_facebook_sync_enabled to ‘no’ with a MySQL database query, will the plugin sync this product and remove it from the Facebook catalog?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hi @daveverzijl ??

    If I update the field Meta: _wc_facebook_sync_enabled to ‘no’ with a MySQL database query, will the plugin sync this product and remove it from the Facebook catalog?

    Yes, setting the Meta Field of _wc_facebook_sync_enabled to no will result in the product not being synchronized anymore.

    I hope that this helps ??

    Thread Starter DaveVerzijl

    (@daveverzijl)

    Thanks for your answer. Does the plugin re-evaluate the database continiously? So if I update it now, how long would it take for the plugin to notice the database change and update the Facebook catalog?

    Is there a query available who does this:

    – Find all products that have one or more Variants with 0 stock. Update Meta: _wc_facebook_sync_enabled to ‘no’ for all variants for product

    – Find all products where all Variants have 1 or more stock. Update Meta: _wc_facebook_sync_enabled to ‘yes’ for all variants for product

    You’re welcome ??

    Does the plugin re-evaluate the database continiously? So if I update it now, how long would it take for the plugin to notice the database change and update the Facebook catalog?

    It would be best to sync your products again via the Product Sync tab, as shown here. Normally, they would automatically be synced when a new product is added or if an existing product is edited via the WordPress Dashboard.

    Regarding your other question about a query that can automatically change the _wc_facebook_sync_enabled meta value, I am afraid that this is something that requires customization that extends beyond our scope of support, as per our Support Policy. To get assistance with doing this, we highly recommend contacting one of the services on our Customizations page.

    Thread Starter DaveVerzijl

    (@daveverzijl)

    Just to be sure, will it have any effect if I update it directly in the MySQL database through a query or will these updates never be pushed to Facebook without also clicking the Sync Products button (or updating a product)?

    @daveverzijl

    My understanding is that the sync is triggered whenever a product is added, updated, or deleted. Editing the database directly will not trigger a sync so it is recommended that you initiate a manual sync after any direct editing of the database.

    I hope that helps you to figure it out.
    Feel free to get back to us if you have further questions.

    Thread Starter DaveVerzijl

    (@daveverzijl)

    Thank you for your answer. If I update product A through a database query and after that I update the stock level for a variant for product B through the WooCommerce interface, will product A be updated in the Facebook Catalog, too?

    Hi @daveverzijl!

    Updating product A directly from the database query and then updating a stock level of a variant for product B using the WooCommerce Interface, should trigger a sync thus updating both products.

    Any change to an existing product triggers a sync and that syncs all the changes with the Facebook Catalog.

    You can read more about syncing here: https://woocommerce.com/document/facebook-for-woocommerce/#catalog-syncing.

    I hope this answers your questions.
    Feel free to reach back if you have further questions.

    Thread Starter DaveVerzijl

    (@daveverzijl)

    I have done some testing and unfortunately, changing the sync setting of a variant from “Sync and show in catalog” to “Do not sync” through the WordPress Admin interface does not have any effect in the Facebook Catalog. The variant is not being removed from the catalog. Can you test this on your side and confirm this bug?

    Hello @daveverzijl ,

    If I understand your workflow correctly, you changed the sync setting of a variation from “Sync and show in catalog” to “Do not sync”. You expected the product to be deleted from Facebook Catalog, right?

    You need to use the “Remove from sync and delete” option when changing the sync setting if you also want to delete the product from the catalog.

    Sync-delete
    Link to image: https://d.pr/i/aQpVOK

    Since Facebook for WooCommerce is an open-source project, you can create an issue yourself in the GitHub repository: https://github.com/woocommerce/facebook-for-woocommerce/issues

    Let us know if you have any other queries.

    Thank you.

    Thread Starter DaveVerzijl

    (@daveverzijl)

    Hi @daveverzijl ,

    That option does not exist in a Variable product.

    That option would show once you select the “Do not sync” option for the variation. Please see this GIF for reference: https://d.pr/i/Dvg1FT

    I hope that helps!

    Thread Starter DaveVerzijl

    (@daveverzijl)

    Thank you for your answer. In my previous messages I asked if changing the _wc_facebook_sync_enabled meta value to no would mean that the item would not sync, which was confirmed.

    I would also expect that changing it to ‘no’ would delete the variant from the catalog. Do I understand you correctly that only changing that meta value doesn’t remove the product from the catalog and only prevents a non-synced variant to be synced?

    If so, what database value do I have to change to what value to get an already synced variant to be also removed from the catalog?

    Hello @daveverzijl ,

    Do I understand you correctly that only changing that meta value doesn’t remove the product from the catalog and only prevents a non-synced variant to be synced?

    That’s right. Changing the “_wc_facebook_sync_enabled” doesn’t delete the product from the catalog. You have to specifically use the delete option to delete the product from the catalog.

    I do not have a direct idea of how this can be achieved on the database directly. I was able to locate the code that seems to trigger the delete process. You can see the code here: https://github.com/woocommerce/facebook-for-woocommerce/blob/3b881dae8942bdbeac871c8cbf6f418fb482e407/facebook-commerce.php#L998

    Since this will require customization, I’ll keep this thread open for a little longer to see if anyone else can chime in to share any other hints.

    We have our developer resources portal that can help you get going, so I would recommend you to check it further from here: https://developer.woocommerce.com/

    You can also visit the WooCommerce Community Forum, the WooCommerce FB group, or the #developers channel of our Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, too.

    Another option is to check our customizations page to hire an expert that can create a custom solution for you: https://woocommerce.com/customizations/`

    Thank you ??

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you ??

    Thread Starter DaveVerzijl

    (@daveverzijl)

    This issue has not been resolved and is still active. I’m actually quite surprised that you want to close the topic while your last answer was “Let’s want to see if someone else has the answer.” Why the hurry? Closing a topic doesn’t mean a problem is solved ??

    • This reply was modified 3 years, 2 months ago by DaveVerzijl.
    • This reply was modified 3 years, 2 months ago by DaveVerzijl.
Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Update through database query’ is closed to new replies.