File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 13
13
class FormSubmit {
14
14
/**
15
15
* Build class.
16
+ *
16
17
* @codeCoverageIgnore
17
18
*/
18
19
public function __construct () {
@@ -21,7 +22,9 @@ public function __construct() {
21
22
22
23
/**
23
24
* Init
25
+ *
24
26
* @return void
27
+ *
25
28
* @codeCoverageIgnore
26
29
*/
27
30
private function init () {
@@ -42,6 +45,7 @@ private function init() {
42
45
/**
43
46
* Enqueues the required JavaScript for form submissions integration.
44
47
* @return void
48
+ *
45
49
* @codeCoverageIgnore because there's nothing to test here.
46
50
*/
47
51
public function add_js () {
@@ -92,9 +96,12 @@ public function maybe_track_submission( $result, $tags ) {
92
96
* @param $uri
93
97
*
94
98
* @return void
99
+ *
100
+ * @codeCoverageIgnore because we can't test XHR requests here.
95
101
*/
96
102
private function track_submission ( $ uri ) {
97
103
$ proxy = new Proxy ( false );
104
+
98
105
$ proxy ->do_request (
99
106
__ ( 'WP Form Completions ' , 'plausible-analytics ' ),
100
107
null ,
@@ -106,12 +113,14 @@ private function track_submission( $uri ) {
106
113
/**
107
114
* Compatibility fix for Gravity Forms.
108
115
*
109
- * @action gform_after_submission
116
+ * @action gform_after_submission
110
117
*
111
118
* @param $form
112
119
* @param $entry
113
120
*
114
121
* @return void
122
+ *
123
+ * @codeCoverageIgnore because we can't test XHR requests here.
115
124
*/
116
125
public function track_gravity_forms_submission ( $ form ) {
117
126
$ uri = str_replace ( home_url (), '' , $ form [ 'source_url ' ] ) ?? '' ;
You can’t perform that action at this time.
0 commit comments