{"id":1950430,"date":"2021-07-16T12:13:00","date_gmt":"2021-07-16T16:13:00","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?post_type=tribe-knowledgebase&#038;p=1950430"},"modified":"2024-08-20T11:13:16","modified_gmt":"2024-08-20T15:13:16","slug":"using-composer-with-the-events-calendar-for-development","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/using-composer-with-the-events-calendar-for-development\/","title":{"rendered":"Using Composer with The Events Calendar for Development"},"content":{"rendered":"\n<p>Any of our premium plugins work with <a href=\"https:\/\/getcomposer.org\" target=\"_blank\" rel=\"noreferrer noopener\">Composer<\/a>, allowing developers to install and manage them as dependencies in a development environment. This is a convenient way to develop locally by integrating the plugin repositories into your site&#8217;s repository without directly adding it to your project. It also makes plugin updates easier to manage and install as you develop.<\/p>\n\n<p>In order to do this, you&#8217;ll need to generate a <code><a href=\"https:\/\/getcomposer.org\/doc\/01-basic-usage.md#composer-json-project-setup\" target=\"_blank\" rel=\"noreferrer noopener\">composer.json<\/a><\/code> file for our plugins at the root of your project. This file contains variables that tell Composer what to install and details about what&#8217;s being installed. Let&#8217;s walk through what that file needs in it for Composer to fetch, install, and manage the plugin repositories in your own project.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-locate-the-url\">Locate the URL<\/h2>\n\n<p>The first thing you need is the URL of the plugin that you want to install. You can find this URL on your <a href=\"https:\/\/theeventscalendar.com\/my-account\/downloads\/\" target=\"_blank\" rel=\"noreferrer noopener\">Downloads<\/a> page in your account. Right-click on <strong>Download<\/strong> and then click on <strong>Copy Link<\/strong>. That link is what you use in the URL field.<\/p>\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/07\/Screen-Shot-2021-07-16-at-1.14.33-PM.png\" alt=\"Find the URL on the Downloads page at theeventscalendar.com to add a premium plugin to composer\" class=\"wp-image-1950431\"\/><\/figure>\n\n<p>Repeat this step for any other premium plugins that you&#8217;d like to add via Composer at the same time.<\/p>\n\n<p>You can also create this URL manually with the plugin slug, version number, and license key.<\/p>\n\n<p>The URL looks something like this:<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/evnt.is\/fetch-{plugin-slug}?key={license-key}\n<\/pre><\/div>\n<p>&#8230;where <code>{plugin-slug}<\/code> and <code>{license-key}<\/code> are placeholders for you to fill in with your own information. Each of our premium plugins has specific URLs that you can utilize (though each one requires a license key to use):<\/p>\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Plugin<\/strong><\/td><td><strong>URL<\/strong><\/td><\/tr><tr><td>The Events Calendar Pro<\/td><td><a href=\"https:\/\/evnt.is\/fetch-ecp?key=LICENSEKEY\" rel=\"nofollow\">https:\/\/evnt.is\/fetch-ecp?key=LICENSEKEY<\/a><\/td><\/tr><tr><td>Event Tickets Plus<\/td><td><a href=\"https:\/\/evnt.is\/fetch-etp?key=LICENSEKEY\" rel=\"nofollow\">https:\/\/evnt.is\/fetch-etp?key=LICENSEKEY<\/a><\/td><\/tr><tr><td>Community Events<\/td><td><a href=\"https:\/\/evnt.is\/fetch-ce?key=LICENSEKEY\" rel=\"nofollow\">https:\/\/evnt.is\/fetch-ce?key=LICENSEKEY<\/a><\/td><\/tr><tr><td>Eventbrite Tickets<\/td><td><a href=\"https:\/\/evnt.is\/fetch-ebt?key=LICENSEKEY\" rel=\"nofollow\">https:\/\/evnt.is\/fetch-ebt?key=LICENSEKEY<\/a><\/td><\/tr><tr><td>Filter Bar<\/td><td><a href=\"https:\/\/evnt.is\/fetch-fbar?key=LICENSEKEY\" rel=\"nofollow\">https:\/\/evnt.is\/fetch-fbar?key=LICENSEKEY<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n<p>You can also specify the version number to fetch in your file by adding <code>&amp;version={VERSION}<\/code> to the URL. If you choose not to include the version number, Composer will fetch the most recent version instead.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-composer-json-file-example\"><code>composer.json<\/code> file example<\/h2>\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n  &quot;repositories&quot;: &#x5B;\n    {\n      &quot;type&quot;: &quot;package&quot;,\n      &quot;package&quot;: {\n        &quot;name&quot;: &quot;the-events-calendar\/events-calendar-pro&quot;,\n        &quot;version&quot;: &quot;5.8.0&quot;,\n        &quot;type&quot;: &quot;wordpress-plugin&quot;,\n        &quot;dist&quot;: {\n          &quot;url&quot;: &quot;https:\/\/evnt.is\/fetch-ecp?key=&#x5B;insert-key]&amp;amp;version=5.8.0&quot;,\n          &quot;type&quot;: &quot;zip&quot;\n        }\n      }\n    }\n  ],\n  &quot;require&quot;: {\n    &quot;the-events-calendar\/events-calendar-pro&quot;: &quot;5.8.0&quot;\n  },\n  &quot;extra&quot;: {\n    &quot;installer-paths&quot;: {\n      &quot;plugins\/{$name}&quot;: &#x5B;\n        &quot;type:wordpress-plugin&quot;\n      ]\n    }\n  },\n  &quot;minimum-stability&quot;: &quot;dev&quot;\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Any of our premium plugins work with Composer, allowing developers to install and manage them as dependencies in a development environment. This is a convenient way to develop locally by integrating the plugin repositories into your site&#8217;s repository without directly adding it to your project. It also makes plugin updates easier to manage and install&#8230;<\/p>\n","protected":false},"author":84,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[59],"tags":[58],"stellar-product-taxonomy":[156,158],"class_list":["post-1950430","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-function-snippets","tag-php","stellar-product-taxonomy-event-tickets-plus","stellar-product-taxonomy-events-calendar-pro"],"acf":[],"taxonomy_info":{"category":[{"value":59,"label":"PHP Functions &amp; Snippets"}],"post_tag":[{"value":58,"label":"PHP"}],"stellar-product-taxonomy":[{"value":156,"label":"Event Tickets Plus"},{"value":158,"label":"Events Calendar Pro"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"The Events Calendar Team","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/the_events_calendar_team\/"},"comment_info":0,"category_info":[{"term_id":59,"name":"PHP Functions &amp; Snippets","slug":"php-function-snippets","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":42,"filter":"raw","term_order":"0","cat_ID":59,"category_count":42,"category_description":"","cat_name":"PHP Functions &amp; Snippets","category_nicename":"php-function-snippets","category_parent":24}],"tag_info":[{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":26,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1950430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/84"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1950430"}],"version-history":[{"count":6,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1950430\/revisions"}],"predecessor-version":[{"id":1962527,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1950430\/revisions\/1962527"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1950430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1950430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1950430"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1950430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}