{"id":1514124,"date":"2018-04-23T13:51:45","date_gmt":"2018-04-23T20:51:45","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/"},"modified":"2018-04-23T13:51:45","modified_gmt":"2018-04-23T20:51:45","slug":"looking-for-a-way-to-bulk-update-recurring-events","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/","title":{"rendered":"Looking for a way to bulk update recurring events"},"content":{"rendered":"<p>Hello, my name is Christopher, I&#8217;ve been looking for a way to bulk update recurring events.<\/p>\n<p>A little history:<br \/>\nThe website my team is working on has 300 or so parent events that are recurring for a total of around 10,000 events per year. It has slowed down the website immensely and I&#8217;ve been searching for ways to reduce the overall number of events to as few as possible. I have now limited the range of recurrence to three months in the future and cleanup past events after one month. I have discover the runaway recurrence cleanup tool and have used it on an event and then opened the parent event to update it and remake the recurrences. That works fine, but I have 313 parent events and that workflow will take forever. Furthermore, I may have to do this process on an on-going basis so you see the need to be able to do this in bulk. Basically, we need to be able to recreate all recurring events automatically.<\/p>\n<p>Our approach:<br \/>\nOur approach was to write a plugin that piggybacks on the Cleanup Recurring Events tool to automatically update the parent event to recreate the recurring events once the recurrences are deleted. It would then cycle to the next parent event to do the same thing until all parent events have been updated. We have some of the pieces figured out. From the Cleanup Recurring Events tool we can get all of the parent events and delete the recurrences and do this in a foreach loop to delete everything all recurrences. The part we haven&#8217;t figured out after digging through The Events Calendar\/Pro is how to trigger the recreation of event recurrences. We narrowed it down to the Tribe__Events__Pro__Recurrence__Events_Saver class and the save_events() method but then it gets a bit messy because of the never-ending cycle of trying to get the arguments\/properties correct. Maybe we aren&#8217;t even on the right path at all&#8230;<\/p>\n<p>If you would please help us figure out how to bulk update all parent events to recreate recurrences, we&#8217;d be grateful and others may find it useful as well. Likewise, if you require more information, please let me know. Thank you.<\/p>\n","protected":false},"template":"","class_list":["post-1514124","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Looking for a way to bulk update recurring events -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Looking for a way to bulk update recurring events -\" \/>\n<meta property=\"og:description\" content=\"Hello, my name is Christopher, I&#8217;ve been looking for a way to bulk update recurring events. A little history: The website my team is working on has 300 or so parent events that are recurring for a total of around 10,000 events per year. It has slowed down the website immensely and I&#8217;ve been searching [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/\",\"name\":\"Looking for a way to bulk update recurring events -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-04-23T20:51:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Looking for a way to bulk update recurring events\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Looking for a way to bulk update recurring events -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/","og_locale":"en_US","og_type":"article","og_title":"Looking for a way to bulk update recurring events -","og_description":"Hello, my name is Christopher, I&#8217;ve been looking for a way to bulk update recurring events. A little history: The website my team is working on has 300 or so parent events that are recurring for a total of around 10,000 events per year. It has slowed down the website immensely and I&#8217;ve been searching [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/","name":"Looking for a way to bulk update recurring events -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-04-23T20:51:45+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/looking-for-a-way-to-bulk-update-recurring-events\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Looking for a way to bulk update recurring events"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1514124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1514124\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1514124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}