Automator_Recipe_Process_Complete::get_action_error_message( null $user_id = null, null $action_data = null, null $recipe_id = null, string $error_message = '', null $recipe_log_id = null, array $args = array() )


Parameters Parameters

$user_id

(null) (Optional)

Default value: null

$action_data

(null) (Optional)

Default value: null

$recipe_id

(null) (Optional)

Default value: null

$error_message

(string) (Optional)

Default value: ''

$recipe_log_id

(null) (Optional)

Default value: null

$args

(array) (Optional)

Default value: array()


Top ↑

Return Return

(mixed|string)


Source Source

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

	public function get_action_error_message( $user_id = null, $action_data = null, $recipe_id = null, $error_message = '', $recipe_log_id = null, $args = array() ) {

		if ( ! empty( $error_message ) && key_exists( 'complete_with_errors', $action_data ) ) {
			return $error_message;
		}

		if ( key_exists( 'user_action_message', $args ) && ! empty( $args['user_action_message'] ) ) {
			return $args['user_action_message'];
		}

		return '';

	}