Automator_Get_Data::recipe_completed_times( $recipe_id )

Return the number of times recipe is completed successfully


Parameters Parameters

$recipe_id

(Required)


Top ↑

Return Return

(string|null)


Source Source

File: src/core/lib/utilities/class-automator-get-data.php

	public function recipe_completed_times( $recipe_id ) {
		global $wpdb;
		$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(run_number) FROM {$wpdb->prefix}uap_recipe_log WHERE automator_recipe_id=%d AND completed = %d", $recipe_id, 1 ) );
		return is_numeric( $count ) ? $count : 0;
	}