EDD_ORDERDONE::edd_complete_purchase( $payment_id )

Validation function when the trigger action is hit


Parameters Parameters

$payment_id

(Required)


Source Source

File: src/integrations/edd/triggers/edd-orderdone.php

	public function edd_complete_purchase( $payment_id ) {

		//TODO:: Complete this function


		$post_id = 0;
		$user_id = get_current_user_id();
		$args    = [
			'code'    => $this->trigger_code,
			'meta'    => $this->trigger_meta,
			'post_id' => $post_id,
			'user_id' => $user_id,
		];

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