Create Venues
Venues can be created programmatically using:
tribe_venues()->set_args( $venue_args )->create();
The $venue_args is an array with key-value pairs, accepting arguments like in this example:
$venue_args = [
'venue' => 'Published Venue',
'status' => 'publish',
'show_map' => false,
'show_map_link' => false,
'address' => 'Venue address',
'city' => 'Venue city',
'country' => 'Venue country',
'province' => 'Venue province',
'state' => 'Venue state',
'stateprovince' => 'Venue stateprovince',
'zip' => 'Venue zip',
'phone' => 'Venue phone',
'website' => 'http://venue.com',
];
The only field that is required when creating a new venue is the title, which is aliased as 'venue'
Further information about accepted arguments when creating a venue:
string$addressThe venue address field, normally street and number.string$countryWhich country the venue happens, full name of the country, no abbr.string$cityThe city for the venue.string$state_provinceState or province for the venue, available for venues outside of the US.string$stateThe state for the venue in case of a US-based venue.string$provinceProvince for the venue (mostly deprecated, use state_province).stringorint$zipZip code of the venue.boolean$overwrite_coordinatesDid this venue get its coordinates overwritten manually.string$latitudeThe latitude of the venue.string$longitudeThe longitude of the venue.string$geolocation_stringThe string we use to crawl and link to the maps provider.