Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Mailchimp_Helpers::log_action_error( $response, $user_id, $action_data, $recipe_id )
Method log_action_error
Contents
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $response
(Required)
- $user_id
(Required)
- $action_data
(Required)
- $recipe_id
(Required)
Return Return
(void)
Source Source
File: src/integrations/mailchimp/helpers/mailchimp-helpers.php
public function log_action_error( $response, $user_id, $action_data, $recipe_id ) { global $uncanny_automator; // log error when no token found. $error_msg = __( 'API error: ', 'uncanny-automator' ); if ( isset( $response->data->title ) ) { $error_msg .= ' ' . $response->data->title; } if ( isset( $response->data->detail ) ) { $error_msg .= ' ' . $response->data->detail; } if ( isset( $response->data->errors ) ) { foreach ( $response->data->errors as $error ) { $error_msg .= ' ' . $error->field; $error_msg .= ' ' . $error->message; } } if ( isset( $response->error->type ) ) { $error_msg .= ' ' . $response->error->type; } if ( isset( $response->error->description ) ) { $error_msg .= ' ' . $response->error->description; } $action_data['do-nothing'] = true; $action_data['complete_with_errors'] = true; $uncanny_automator->complete_action( $user_id, $action_data, $recipe_id, $error_msg ); }
Expand full source code Collapse full source code View on Github