Usage_Reports::get_recipes_info()

get_recipes_info


Return Return

(void)


Source Source

File: src/core/classes/class-usage-reports.php

	public function get_recipes_info() {

		if ( empty( $this->recipes_data ) ) {
			return;
		}

		foreach ( $this->recipes_data as $recipe_data ) {

			if ( $recipe_data['post_status'] !== 'publish' ) {
				$this->report['recipes']['unpublished_recipes_count'] ++;
				continue;
			}

			$this->process_recipe_data( $recipe_data );
			$this->process_items( 'triggers', $recipe_data );
			$this->process_items( 'actions', $recipe_data );

		}

		$this->report['recipes']['total_integrations_used'] = count( $this->report['integrations'] );
		$this->report['recipes']['completed_recipes']       = Automator()->get->total_completed_runs();

	}