UC_CODEREDEEMED::user_redeemed_code( $user_id,  $coupon_id,  $result )


Parameters Parameters

$user_id

(Required)

$coupon_id

(Required)

$result

(Required)


Source Source

File: src/integrations/uncanny-codes/triggers/uc-coderedeemed.php

	public function user_redeemed_code( $user_id, $coupon_id, $result ) {


		if ( ! $user_id ) {
			$user_id = get_current_user_id();
		}
		if ( empty ( $user_id ) ) {
			return;
		}

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

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