Increase the maximum number of batches allowed during a Pinterest for WooCommerce feed-generation cycle when the default limit is too low for a large catalog.
Note:
This is a developer-level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customization work. We are unable to provide support for customization under our Support Policy.
Before you start
↑ Back to topCheck the feed-generation error and logs first. Test changes on a staging site and monitor feed generation for timeouts or other failures.
Change the limit
↑ Back to topPinterest for WooCommerce defaults to a limit of 1,000 batches per generation cycle. A batch normally contains 100 products, although its size can change. The following example raises the batch limit to 1,500. Add it to a custom plugin and adjust the value for your catalog:
add_filter(
'pinterest_for_woocommerce_max_feed_batches_per_cycle',
function () {
return 1500;
}
);
Raising the limit allows more batches to be scheduled; it does not resolve a separate timeout or feed-generation error. Choose a limit appropriate to the number of products and the site’s resources.
Verify or revert the change
↑ Back to topRun feed generation again and check its status and logs for completion or a new error. Remove the filter to return to the default limit. If generation still fails, investigate the reported error before increasing the limit again.
Questions and support
↑ Back to topDo you still have questions and need assistance?
- Get in touch with a Happiness Engineer via our Help Desk. We provide support for extensions developed by and/or sold on WooCommerce.com, and Jetpack/WordPress.com customers.
- If you are not a customer, we recommend finding help in the WooCommerce support forum or hiring a Woo Agency Partner. These are trusted agencies with a proven track record of building highly customized, scalable online stores. Learn more about Woo Agency Partners.