get_automation_data_value( Slack_Channel_Field::get_id() ); $api_instance = \Thrive_Dash_List_Manager::connection_instance( 'slack' ); $response = false; if ( $api_instance && $api_instance->is_connected() ) { $args = array( 'fields' => $this->get_automation_data_value( 'fields_webhook', [] ), 'text' => $this->get_automation_data_value( Slack_Message_Title_Field::get_id() ), ); $response = $api_instance->post_message( $channel, $args ); } if ( empty( $response->ok ) ) { $result = [ 'status_code' => 400, 'message' => __( 'Request failed with error message', 'thrive-dash' ) . ': ' . $response->error ]; } else { $result = [ 'status_code' => 200 ]; } return $result; } public function prepare_data( $data = array() ) { $this->data = $data; } }