Note: We are unable to provide support for customizations under our Support Policy. If you need to customize a snippet, or extend its functionality, seek assistance from a qualified WordPress/WooCommerce Developer. We highly recommend Codeable, or a Certified WooExpert.
Delete All Products↑ Back to top
Occasionally deleting all products from the Facebook catalog and then letting things sync again is the only way to fix strange issues.
The following code snippet can be used to delete all products in bulk:
This snippet is designed to continue running even if it encounters a timeout by doing batches of 500 products at a time. While you usually won’t run into a timeout, if you have thousands and thousands of products in your store, you may want to be aware that the admin area might time out a few times leading to a white screen right after you install the snippet. Don’t worry! Keep refreshing the page until the admin is back up, at which point all products will have been processed. It’s important to note that the snippet only runs when someone loads an admin page so it won’t affect any customers browsing the site. 🙂
The snippet is smart in that it runs only once so it’s not a big deal if you leave it around, but it’s always good to remove unused code. If the snippet doesn’t work, however, triggering it again requires updating the option name in the code snippet or deleting the option the snippet stored in the first place.
Reset All Products↑ Back to top
Somewhat related to that, below is a snippet to bulk reset Facebook data for all products :
Delete Facebook Catalog↑ Back to top
The script above only helps with deleting all products published in your WooCommerce store from the Facebook catalog. In cases where the products are entirely deleted (programmatically deleted, for example), some orphan products will remain on the FB catalog.
The next best option to remove all products from Facebook is to delete your Facebook catalog, then disconnect and reconnect the Facebook for WooCommerce extension.
To delete a catalog, please follow the steps below:
- Go to Commerce Manager.
- In the “Catalogues” section, click on “Manage list”
- Select the catalog that you want to delete.
- Click on the “Delete” button then confirm by clicking “Delete”
You’ve deleted your catalog.