{"id":44396,"date":"2013-03-29T17:03:10","date_gmt":"2013-03-30T00:03:10","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/"},"modified":"2013-03-29T17:03:10","modified_gmt":"2013-03-30T00:03:10","slug":"invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/","title":{"rendered":"Invalid Country Code when adding new event to Eventbridge via WordPress (Canada)"},"content":{"rendered":"<p>When I create an event in Canada, the eventbrite portion fails with an &#8220;Invalid Country Code&#8221; error. If I change the venue to the United States it works fine. <\/p>\n<p>So, I&#8217;ve narrowed it down to the following code, and have hacked up a quick fix for myself, but haven&#8217;t had time to debug it properly. It looks like self::get_country_code() is returning a bunk value (but not NO value, that would be a different error), to test (and quick fix) I forced the value to &#8220;CA&#8221; and it works fine. <\/p>\n<p>Line 828 of tribe-eventbrite.class.php \u2014<\/p>\n<p>    $country_code = self::get_country_code( $event_id );<br \/>\n    if ( $country_code ) {<br \/>\n      $requestParams .= &#8216;&amp;country_code=CA&#8217;;\/\/ . urlencode( $country_code );<br \/>\n    }<br \/>\n    return $requestParams;<\/p>\n","protected":false},"template":"","class_list":["post-44396","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>Invalid Country Code when adding new event to Eventbridge via WordPress (Canada) -<\/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\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Invalid Country Code when adding new event to Eventbridge via WordPress (Canada) -\" \/>\n<meta property=\"og:description\" content=\"When I create an event in Canada, the eventbrite portion fails with an &#8220;Invalid Country Code&#8221; error. If I change the venue to the United States it works fine. So, I&#8217;ve narrowed it down to the following code, and have hacked up a quick fix for myself, but haven&#8217;t had time to debug it properly. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/\" \/>\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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/\",\"name\":\"Invalid Country Code when adding new event to Eventbridge via WordPress (Canada) -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2013-03-30T00:03:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/#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\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Eventbrite Tickets\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/eventbrite-tickets\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Invalid Country Code when adding new event to Eventbridge via WordPress (Canada)\"}]},{\"@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":"Invalid Country Code when adding new event to Eventbridge via WordPress (Canada) -","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\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/","og_locale":"en_US","og_type":"article","og_title":"Invalid Country Code when adding new event to Eventbridge via WordPress (Canada) -","og_description":"When I create an event in Canada, the eventbrite portion fails with an &#8220;Invalid Country Code&#8221; error. If I change the venue to the United States it works fine. So, I&#8217;ve narrowed it down to the following code, and have hacked up a quick fix for myself, but haven&#8217;t had time to debug it properly. [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/","name":"Invalid Country Code when adding new event to Eventbridge via WordPress (Canada) -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2013-03-30T00:03:10+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/invalid-country-code-when-adding-new-event-to-eventbridge-via-wordpress-canada\/#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":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Eventbrite Tickets","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/eventbrite-tickets\/"},{"@type":"ListItem","position":5,"name":"Invalid Country Code when adding new event to Eventbridge via WordPress (Canada)"}]},{"@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\/44396","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\/44396\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=44396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}