EC_REGISTER::user_registered( $product_id,  $order_id,  $qty )

Validation function when the trigger action is hit


Parameters Parameters

$order_id

(Required)


Source Source

File: src/integrations/event-tickets/triggers/ec-register.php

	public function user_registered( $product_id, $order_id, $qty ) {

		if ( ! $order_id ) {
			return;
		}

		$event    = tribe_events_get_ticket_event( $product_id );
		$event_id = ( $event instanceof WP_Post ) ? $event->ID : false;

		$user_id = get_current_user_id();

		$args = [
			'code'    => $this->trigger_code,
			'meta'    => $this->trigger_meta,
			'post_id' => $event_id,
			'user_id' => $user_id,
		];

		Automator()->maybe_add_trigger_entry( $args );
	}