PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 3.6.21
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v3.6.21
6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 3.6.66 All 195 releases
fluentform / app / Services / Integrations / LogResponseTrait.php

LogResponseTrait.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 3.6.21, at app/Services/Integrations/LogResponseTrait.php

33 lines 612 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Services\Integrations;
4
5 trait LogResponseTrait
6 {
7 protected function logResponse($response, $feed, $data, $form, $entryId, $status)
8 {
9 if (!$response) return;
10
11 $prefix = 'fluentform_after_submission_api_response_';
12 $action = $prefix . $status;
13
14 do_action(
15 $action,
16 $form,
17 $entryId,
18 $data,
19 $feed,
20 $response,
21 $this->getApiResponseMessage($response, $status)
22 );
23 }
24
25 protected function getApiResponseMessage($response, $status)
26 {
27 if (is_array($response) && isset($response['message'])) {
28 return $response['message'];
29 }
30
31 return $status;
32 }
33 }