Changeset 3397112
- Timestamp:
- 11/17/2025 10:52:43 AM (4 months ago)
- Location:
- form-attribution-tracking/trunk
- Files:
-
- 3 edited
-
attribution-tracking.php (modified) (2 diffs)
-
readme.md (modified) (2 diffs)
-
src/Integrations/FluentFormsIntegration.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
form-attribution-tracking/trunk/attribution-tracking.php
r3397097 r3397112 4 4 * Plugin URI: https://wordpress.org/plugin/form-referral-source 5 5 * Description: Automatically adds permanent hidden referral source fields to forms from Formidable and Fluent Forms 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Author: Ryan Howard 8 8 * Author URI: https://www.ryanhoward.dev … … 23 23 24 24 // Define plugin constants 25 define('ATTRIBUTION_TRACKING_VERSION', '1.0. 0');25 define('ATTRIBUTION_TRACKING_VERSION', '1.0.1'); 26 26 define('ATTRIBUTION_TRACKING_PLUGIN_FILE', __FILE__); 27 27 define('ATTRIBUTION_TRACKING_PLUGIN_DIR', plugin_dir_path(__FILE__)); -
form-attribution-tracking/trunk/readme.md
r3397093 r3397112 6 6 Tested up to: 6.8 7 7 Requires PHP: 8.0 8 Stable tag: 1.0. 08 Stable tag: 1.0.1 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 205 205 ## Changelog 206 206 207 ### 1.0.1 208 - Fixed a fatal error occurring on Fluent Forms submissions when fallback attribution data was processed as a string instead of an array. 209 - Improved validation and safety checks for referral source population. 210 - Enhanced compatibility with Fluent Forms to prevent incorrect data handling. 211 212 207 213 ### 1.0.0 208 214 - Initial release -
form-attribution-tracking/trunk/src/Integrations/FluentFormsIntegration.php
r3397093 r3397112 91 91 { 92 92 $field_name = $this->getReferralSourceFieldName(); 93 93 94 94 // Only populate if field is empty (JavaScript failed) 95 95 if (!isset($data[$field_name]) || empty($data[$field_name])) { 96 96 $referral_source = $this->getReferralSourceFromRequest(); 97 97 if ($referral_source) { 98 $insertData['response'][$field_name] = $referral_source; 98 $rawResponse = $insertData['response'] ?? ''; 99 100 if (is_string($rawResponse) && $rawResponse !== '') { 101 $response = json_decode($rawResponse, true); 102 if (json_last_error() !== JSON_ERROR_NONE || !is_array($response)) { 103 $response = []; 104 } 105 } elseif (is_array($rawResponse)) { 106 $response = $rawResponse; 107 } else { 108 $response = []; 109 } 110 $response[$field_name] = $referral_source; 111 112 $insertData['response'] = wp_json_encode($response); 99 113 $this->log('Fallback referral source populated', [ 100 114 'form_id' => $form->id,
Note: See TracChangeset
for help on using the changeset viewer.