Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WP_USERCREATESPOST::complete_trigger( $matched_recipe_ids,  $user_id,  $post )


Parameters Parameters

$matched_recipe_ids

(Required)

$user_id

(Required)

$post

(Required)


Top ↑

Return Return

(void)


Source Source

File: src/integrations/wp/triggers/wp-usercreatespost.php

	private function complete_trigger( $matched_recipe_ids, $user_id, $post ) {
		foreach ( $matched_recipe_ids as $recipe_id => $trigger_id ) {
			$recipe_id  = absint( $recipe_id );
			$trigger_id = absint( $trigger_id );
			$pass_args  = array(
				'code'             => $this->trigger_code,
				'meta'             => $this->trigger_meta,
				'user_id'          => $user_id,
				'recipe_to_match'  => $recipe_id,
				'trigger_to_match' => $trigger_id,
				'ignore_post_id'   => true,
				'is_signed_in'     => true,
			);
			$args = Automator()->maybe_add_trigger_entry( $pass_args, false );
			if ( empty( $args ) ) {
				continue;
			}
			foreach ( $args as $result ) {
				if ( false === $result['result'] ) {
					continue;
				}
				$this->store_tokens( $result, $user_id, $post, $recipe_id, $trigger_id );
				Automator()->maybe_trigger_complete( $result['args'] );
			}
		}
	}