{"id":1389,"date":"2024-08-17T21:47:40","date_gmt":"2024-08-18T02:47:40","guid":{"rendered":"https:\/\/docs.joedolson.com\/my-calendar\/?p=1389"},"modified":"2024-08-17T21:48:39","modified_gmt":"2024-08-18T02:48:39","slug":"migrating-to-my-calendar","status":"publish","type":"post","link":"https:\/\/docs.joedolson.com\/my-calendar\/migrating-to-my-calendar\/","title":{"rendered":"Migrating to My Calendar"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The free version of My Calendar supports migration from two other calendar plugins: <a href=\"https:\/\/wordpress.org\/plugins\/calendar\/\">Kieran O&#8217;Shea&#8217;s &#8220;Calendar&#8221;<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/the-events-calendar\/\">The Events Calendar<\/a>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have either of these plugins installed and active, you&#8217;ll see an additional settings page under the My Calendar admin menu. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"349\" height=\"317\" src=\"https:\/\/docs.joedolson.com\/my-calendar\/wp-content\/uploads\/sites\/3\/2024\/08\/image.png\" alt=\"The WordPress Admin Menu flyout for My Calendar showing the &quot;Migration&quot; option.\" class=\"wp-image-1390\" style=\"width:349px;height:auto\" srcset=\"https:\/\/docs.joedolson.com\/my-calendar\/wp-content\/uploads\/sites\/3\/2024\/08\/image.png 349w, https:\/\/docs.joedolson.com\/my-calendar\/wp-content\/uploads\/sites\/3\/2024\/08\/image-300x272.png 300w\" sizes=\"auto, (max-width: 349px) 100vw, 349px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">My Calendar will inform you how many events you have installed for your current plugin, and provide a button to start a task to import your events. This job will run in the background, and you can be free to leave and let it work.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"147\" src=\"https:\/\/docs.joedolson.com\/my-calendar\/wp-content\/uploads\/sites\/3\/2024\/08\/image-1.png\" alt=\"Import Events panel for The Events Calendar to My Calendar\" class=\"wp-image-1391\" srcset=\"https:\/\/docs.joedolson.com\/my-calendar\/wp-content\/uploads\/sites\/3\/2024\/08\/image-1.png 856w, https:\/\/docs.joedolson.com\/my-calendar\/wp-content\/uploads\/sites\/3\/2024\/08\/image-1-300x52.png 300w, https:\/\/docs.joedolson.com\/my-calendar\/wp-content\/uploads\/sites\/3\/2024\/08\/image-1-768x132.png 768w\" sizes=\"auto, (max-width: 856px) 100vw, 856px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">For The Events Calendar, My Calendar will import all events and venues. If you&#8217;re also running <a href=\"https:\/\/wordpress.org\/plugins\/my-tickets\/\">My Tickets<\/a>, the migration will also import ticket sales information. If you&#8217;re using <a href=\"https:\/\/www.joedolson.com\/awesome\/my-calendar-pro\/\">My Calendar Pro<\/a>, you&#8217;ll be invited to turn on the Hosts custom post type and import Organizers from The Events Calendar, as well. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The data managed by The Events Calendar isn&#8217;t identical to My Calendar, and if you&#8217;re using custom fields, those may not be imported. It is possible to write custom actions to copy your custom fields over to the new events, however. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A custom copy action might look something like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Import ACF custom fields when event is imported from The Events Calendar.\n *\n * @param int $post_id The Events Calendar post ID.\n * @param int $event_id My Calendar event ID.\n * @param int $event_post My Calendar event post ID.\n *\/\nfunction custom_migrate_event_fields( $post_id, $event_id, $event_post ) {\n\t$acf_field_names = array( 'slides', 'slides_0_upload_image', 'slides_1_upload_image', 'slides_2_upload_image', 'slides_1_video_url', 'slides_2_video_url', 'slides_3_video_url' );\n\n\tforeach ( $acf_field_names as $field ) {\n\t\t$meta1 = get_post_meta( $post_id, $field, true );\n\t\t$meta2 = get_post_meta( $post_id, '_' . $field, true );\n\t\tif ( $meta1 ) {\n\t\t\tupdate_post_meta( $event_post, $field, $meta1 );\n\t\t\tupdate_post_meta( $event_post, '_' . $field, $meta2 );\n\t\t}\n\t}\n}\nadd_action( 'my_calendar_event_imported_from_tribe', 'custom_migrate_event_fields', 10, 3 );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The free version of My Calendar supports migration from two other calendar plugins: Kieran O&#8217;Shea&#8217;s &#8220;Calendar&#8221; and The Events Calendar. If you have either of these plugins installed and active, you&#8217;ll see an additional settings page under the My Calendar admin menu. My Calendar will inform you how many events you have installed for your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,76],"tags":[],"class_list":["post-1389","post","type-post","status-publish","format-standard","hentry","category-help","category-tools"],"_links":{"self":[{"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/posts\/1389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/comments?post=1389"}],"version-history":[{"count":1,"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/posts\/1389\/revisions"}],"predecessor-version":[{"id":1392,"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/posts\/1389\/revisions\/1392"}],"wp:attachment":[{"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/media?parent=1389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/categories?post=1389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.joedolson.com\/my-calendar\/wp-json\/wp\/v2\/tags?post=1389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}