Automator_Recipe_Process_User::maybe_change_recipe_log_to_zero( $recipe_id,  $user_id,  $recipe_log_id, bool $change_to_zero = false )


Parameters Parameters

$recipe_id

(Required)

$user_id

(Required)

$recipe_log_id

(Required)

$change_to_zero

(bool) (Optional)

Default value: false


Source Source

File: src/core/lib/process/class-automator-recipe-process-user.php

	public function maybe_change_recipe_log_to_zero( $recipe_id, $user_id, $recipe_log_id, $change_to_zero = false ) {
		$if_exists = Automator()->db->recipe->log_run_pre_exists( $recipe_id, $user_id );
		if ( ! empty( $if_exists ) && (int) $if_exists === (int) $recipe_log_id && true === $change_to_zero ) {
			Automator()->db->recipe->mark_incomplete( $recipe_id, $recipe_log_id );
		}
	}