TEC CLI
A collection of WP-CLI utilities for testing and maintenance purposes.
by The Events Calendar · github.com/the-events-calendar/tec-cli
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/the-events-calendar/tec-cli/archive/refs/heads/master.zipReadme
tribe-cli
WP-CLI tools for Modern Tribe plugins.
Table of contents
Events
Events Generator
Requires The Events Calendar installed and active version 4.5.4 or above.
This command will generate dummy events for TEC using the TEC API function: tribe_create_event
Arguments
count- integer - the total count of events to generate
Example
$ wp tribe events-generator generate --count=1000
Reset events
Requires The Events Calendar installed and active version 4.5.4 or above.
This command will reset all events in TEC. It deletes ALL Events, Organizers, and Venues.
Example
$ wp tribe events-generator reset
Tickets
RSVP tickets attendees generator
Requires Event Tickets installed and active version 4.5.4 or above.
This command will generate attendees for a post with RSVP tickets.
Arguments
post_id- integer - attendees will be assigned to tickets on this postcount- integer - the number of RSVP replies to generatetickets_min- integer - the minimum number of RSVP tickets to assign for each replytickets_max- integer - the maximum number of RSVP tickets to assign for each replyticket_status- string - the status of all the RSVP replies; either empty or one of "yes" or "no"ticket_id- integer - only generate attendees for a specific ticket assigned to the post
Example
$ wp tribe event-tickets generate-rsvp-attendees 23
$ wp tribe event-tickets generate-rsvp-attendees 23 --count=89
$ wp tribe event-tickets generate-rsvp-attendees 23 --tickets_min=3
$ wp tribe event-tickets generate-rsvp-attendees 23 --tickets_min=3 --tickets_max=10
$ wp tribe event-tickets generate-rsvp-attendees 23 --tickets_min=3 --tickets_max=10 --ticket_status=no
$ wp tribe event-tickets generate-rsvp-attendees 23 --ticket_id=89
Reset RSVP tickets
This command will reset attendees for RSVP tickets assigned to a post.
Arguments
post_id- integer - RSVP attendees will be removed from this postticket_id- integer - only remove attendees for a specific RSVP ticket assigned to the post
Example
$ wp tribe event-tickets reset-rsvp-attendees 23
$ wp tribe event-tickets reset-rsvp-attendees 23 --ticket_id=89
WooCommerce tickets order generator
Requires Event Tickets Plus installed and active version 4.10.5 or above.
This command will generate attendees for a post with WooCommerce tickets.
Arguments
post_id- integer - orders will be attached to this post.count- integer - the number of orders to generate.tickets_min- integer - the minimum number of tickets per order.tickets_max- integer - the maximum number of tickets per order.ticket_status- string - the order status of the orders; Must be a valid WC order status (chosen randomly if left out).ticket_id- integer - the ID of the ticket orders should be assigned to.no_create_users- flag - use available subscribers to make orders and avoid creating users.
Example
$ wp tribe event-tickets-plus generate-wc-orders 23
$ wp tribe event-tickets-plus generate-wc-orders 23 --count=89
$ wp tribe event-tickets-plus generate-wc-orders 23 --tickets_min=3
$ wp tribe event-tickets-plus generate-wc-orders 23 --tickets_min=3 --tickets_max=10
$ wp tribe event-tickets-plus generate-wc-orders 23 --tickets_min=3 --tickets_max=10 --ticket_status=no
$ wp tribe event-tickets-plus generate-wc-orders 23 --ticket_id=89
$ wp tribe event-tickets-plus generate-wc-orders 23 --ticket_id=89 --create_users=no
Reset WooCommerce tickets
Removes all generated WC orders from a WooCommerce ticketed post.
Arguments
post_id- integer - orders will be removed from this ticketed post.ticket_id- integer - only remove orders for this WooCommerce ticket attached to the post.
Example
$ wp tribe event-tickets-plus reset-wc-orders 23
$ wp tribe event-tickets-plus reset-wc-orders 23 --ticket_id=89
Payouts
Payouts generator
Requires Community Tickets, installed and active version 4.7.0 or above.
This command will generate orders for a post with tickets. Payouts will be generated from those orders if enabled.
Arguments
post_id- integer - orders and payouts will be assigned to tickets on this post.count- integer - the number of orders to generate. Defaults to 10.tickets_min- integer - the minimum number of tickets to assign for each order.tickets_max- integer - the maximum number of tickets to assign for each order.ticket_id- integer - only generate orders for a specific ticket assigned to the post.status- string - the order status of the orders; Must be a valid WC order status (chosen randomly if left out).
Example
$ wp tribe payouts generate 23
$ wp tribe payouts generate 23 --count=9
$ wp tribe payouts generate 23 --tickets_min=3
$ wp tribe payouts generate 23 --tickets_min=3 --tickets_max=10
$ wp tribe payouts generate 23 --status=processing
$ wp tribe payouts generate 23 --count=8 --status=processing
$ wp tribe payouts generate 23 --ticket_id=89
Delete Payouts
Removes all Payouts from a WooCommerce order. Does NOT delete the order, use reset() (below) for that!.
Arguments
post_id- integer - payouts will be removed from this order.
Example
$ wp tribe payouts delete 23
Update Payouts
Updates all Payouts associated wth a WooCommerce order. Currently only handles status changes!
Arguments
post_id- integer - orders will be removed from this ticketed post.status- string - the desired order status of the payouts; Must be a valid Payout status.
Example
$ wp tribe payouts update 23 --status=paid
Reset Payouts
Removes all generated WC orders and Payouts from a WooCommerce ticketed post.
Arguments
post_id- integer - orders will be removed from this ticketed post.
Example
$ wp tribe payouts reset 23
Docs
Build Docs
Requires WP Parser installed and active. This command will build a JSON file for the purposes of importing into a WP Parser-active site.
Arguments
plugin- string - plugin directory name in wp-plugins that will be parsedoutput- string - file path of the resulting JSON file
Example
$ wp tribe doc build the-events-calendar
$ wp tribe doc build tribe-common --output=/tmp/tribe-common.json
Import Docs
This command will import the output of the doc build command.
Arguments
plugin- string - plugin directory name in wp-plugins that will be parsedfile- string - file path of the JSON file used during import
Example
$ wp tribe doc import the-events-calendar /tmp/the-events-calendar.json --user=1
$ wp tribe doc import tribe-common /tmp/tribe-common.json --user=1Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| 0.3.0 | Nov 17, 2023 |
| 0.2.10 | Oct 1, 2020 |
| 0.2.9 | Sep 12, 2020 |
| 0.2.7 | May 7, 2019 |
| 0.2.0 | May 6, 2019 |
| 0.2.1 | May 6, 2019 |
| 0.2.2 | May 6, 2019 |
| 0.2.3 | May 6, 2019 |
| 0.2.5 | May 6, 2019 |
| 0.1.0 | Sep 7, 2017 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.