Changeset 3387360
- Timestamp:
- 10/31/2025 12:45:21 AM (6 weeks ago)
- Location:
- profiler-donations-gravityforms
- Files:
-
- 11 edited
- 11 copied
-
tags/2.7.1 (copied) (copied from profiler-donations-gravityforms/trunk)
-
tags/2.7.1/cardprocess.php (modified) (2 diffs)
-
tags/2.7.1/class-feedlist-gfaddon.php (copied) (copied from profiler-donations-gravityforms/trunk/class-feedlist-gfaddon.php)
-
tags/2.7.1/class-profilercommon.php (copied) (copied from profiler-donations-gravityforms/trunk/class-profilercommon.php) (4 diffs)
-
tags/2.7.1/class-profilerdonate-gfaddon.php (copied) (copied from profiler-donations-gravityforms/trunk/class-profilerdonate-gfaddon.php) (6 diffs)
-
tags/2.7.1/class-profilerinteraction-gfaddon.php (copied) (copied from profiler-donations-gravityforms/trunk/class-profilerinteraction-gfaddon.php) (2 diffs)
-
tags/2.7.1/class-profilerlists-gfaddon.php (copied) (copied from profiler-donations-gravityforms/trunk/class-profilerlists-gfaddon.php) (1 diff)
-
tags/2.7.1/class-profilerlistsbasic-gfaddon.php (copied) (copied from profiler-donations-gravityforms/trunk/class-profilerlistsbasic-gfaddon.php) (1 diff)
-
tags/2.7.1/class-profilerpostdonate-gfaddon.php (modified) (2 diffs)
-
tags/2.7.1/class-profilerupdate-gfaddon.php (copied) (copied from profiler-donations-gravityforms/trunk/class-profilerupdate-gfaddon.php)
-
tags/2.7.1/index.php (copied) (copied from profiler-donations-gravityforms/trunk/index.php) (1 diff)
-
tags/2.7.1/readme.txt (copied) (copied from profiler-donations-gravityforms/trunk/readme.txt) (2 diffs)
-
tags/2.7.1/woocommerce/integration.php (copied) (copied from profiler-donations-gravityforms/trunk/woocommerce/integration.php)
-
trunk/cardprocess.php (modified) (2 diffs)
-
trunk/class-profilercommon.php (modified) (4 diffs)
-
trunk/class-profilerdonate-gfaddon.php (modified) (6 diffs)
-
trunk/class-profilerinteraction-gfaddon.php (modified) (2 diffs)
-
trunk/class-profilerlists-gfaddon.php (modified) (1 diff)
-
trunk/class-profilerlistsbasic-gfaddon.php (modified) (1 diff)
-
trunk/class-profilerpostdonate-gfaddon.php (modified) (2 diffs)
-
trunk/index.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
profiler-donations-gravityforms/tags/2.7.1/cardprocess.php
r1881378 r3387360 1 1 <?php 2 // This is a legacy file to support credit card field processing in Gravity Forms for Profiler Donations. 3 // It works around some historic issues with how Gravity Forms's JS sends the credit card number field. 4 // Now days, this shouldn't be used - we recommend using Stripe or another modern gateway that handles card processing client-side. 2 5 3 6 function profilerdonation_creditcardfilter($field_content, $field) { … … 10 13 11 14 function profilerdonation_cardprocessscript($form) { 12 wp_enqueue_script('profilerdonation_cardprocessscript', plugin_dir_url(__FILE__).'/cardprocess.js'); 15 // If Gravity Forms has a 'creditcard' field, we need to enqueue our card processing script 16 $has_creditcard = false; 17 foreach($form['fields'] as $field) { 18 if($field->type == 'creditcard') { 19 $has_creditcard = true; 20 break; 21 } 22 } 23 24 if(!$has_creditcard) { 25 return; 26 } 27 28 wp_enqueue_script('profilerdonation_cardprocessscript', trailingslashit(plugin_dir_url(__FILE__)).'cardprocess.js'); 13 29 } 14 30 -
profiler-donations-gravityforms/tags/2.7.1/class-profilercommon.php
r3362220 r3387360 527 527 $field_settings = array(); 528 528 $field_settings['value'] = $inputvalue['id']; 529 $field_settings['label'] = $preface . $inputvalue['label'];529 $field_settings['label'] = $preface . (!empty($field['label']) ? ' ' . $field['label'] . ': ' : '') . $inputvalue['label']; 530 530 $formfields[] = $field_settings; 531 531 } 532 } elseif ($field['type'] == 'hidden') { 533 $formfields[] = array( 534 "value" => $field['id'], 535 "label" => (!empty($field['label']) ? $field['label'] : 'Hidden Field #' . $field['id']) 536 ); 537 } elseif ($field['type'] == 'select') { 538 $formfields[] = array( 539 "value" => $field['id'], 540 "label" => (!empty($field['label']) ? $field['label'] : 'Select Field #' . $field['id']) 541 ); 532 542 } elseif($field["type"] != "creditcard") { 533 543 // Process all fields except credit cards - we don't want them in the list … … 566 576 $formfields[] = array( 567 577 "value" => $field['id'], 568 "label" => $field['label']578 "label" => (!empty($field['label']) ? $field['label'] : 'Hidden Field #' . $field['id']) 569 579 ); 570 580 } … … 682 692 $formfields[] = array( 683 693 "value" => $field['id'], 684 "label" => $field['label']694 "label" => (!empty($field['label']) ? $field['label'] : 'Select Field #' . $field['id']) 685 695 ); 686 696 } … … 717 727 $formfields[] = array( 718 728 "value" => $field['id'], 719 "label" => $field['label']729 "label" => (!empty($field['label']) ? $field['label'] : 'Product Field #' . $field['id']) 720 730 ); 721 731 } -
profiler-donations-gravityforms/tags/2.7.1/class-profilerdonate-gfaddon.php
r3362220 r3387360 336 336 "required" => false, 337 337 "class" => "merge-tag-support", 338 "tooltip" => "This is extra text to be sent to Profiler in the Comments field. You can include Gravity Forms Merge Fields in this textarea to accept additional user input.",338 "tooltip" => "This is extra text to be sent to Profiler in the Comments field. You can include Gravity Forms Merge Fields in this textarea to accept additional user input.", 339 339 ); 340 340 … … 470 470 "choices" => $field_settings 471 471 ); 472 473 $fields[] = array( 474 "label" => 'Client Tags', 475 "type" => "text", 476 "name" => "profilerdonation_clienttags", 477 "required" => false, 478 "class" => "merge-tag-support", 479 "tooltip" => "This field's value should match the Client Tags setup within Profiler. This list can be comma-separated for multiple tags. Use merge fields here to dynamically set tags.", 480 ); 472 481 473 482 $fields[] = array( … … 477 486 "required" => false, 478 487 "tooltip" => "This field's value should match the Purpose Codes setup within Profiler.", 479 "choices" => $field_settings 488 "choices" => $field_settings, 480 489 ); 481 490 … … 660 669 $postData['clientAcquiredReason'] = $this->getDonationCode($feed, 'clientacquisitioncode', $form); 661 670 } 662 671 672 // Client Tags 673 if(!empty($feed['meta']['profilerdonation_clienttags'])) { 674 // Comma separated tags. Can be merge fields. 675 $postData['clientTag'] = trim(GFCommon::replace_variables($feed['meta']['profilerdonation_clienttags'], $form, $entry, false, true, false, 'text')); 676 } 677 663 678 if($feed['meta']['profilerdonation_donationpurposecode'] !== "") { 664 679 $postData['paymentPupose'] = $this->get_field_value($form, $entry, $feed['meta']['profilerdonation_donationpurposecode']); … … 702 717 if(!empty($feed['meta']['profilerdonation_commentsextra'])) { 703 718 // Extra text to append to comments field 704 $comments .= GFCommon::replace_variables($feed['meta']['profilerdonation_commentsextra'], $form, $entry, false, true, false, 'text');719 $comments .= " " . GFCommon::replace_variables($feed['meta']['profilerdonation_commentsextra'], $form, $entry, false, true, false, 'text'); 705 720 } 706 721 … … 712 727 713 728 // Comments 714 $postData['comments'] = $comments;729 $postData['comments'] = trim($comments); 715 730 716 731 if($this->get_field_value($form, $entry, $feed['meta']['profilerdonation_donationtype']) == "regular") { -
profiler-donations-gravityforms/tags/2.7.1/class-profilerinteraction-gfaddon.php
r3368177 r3387360 198 198 199 199 $fields[] = array( 200 "label" => 'Client Acquisition Field', 201 "type" => "select", 202 "name" => "profilerinteraction_clientacquisitioncode", 203 "required" => false, 204 "tooltip" => "This field's value should match the Client Acquisition Codes setup within Profiler.", 205 "choices" => $field_settings, 206 "pf_apifield" => "clientAcquiredReason", 207 ); 208 209 $fields[] = array( 210 "label" => 'Client Tags', 211 "type" => "text", 212 "name" => "profilerinteraction_clienttags", 213 "required" => false, 214 "class" => "merge-tag-support", 215 "tooltip" => "This field's value should match the Client Tags setup within Profiler. This list can be comma-separated for multiple tags. Use merge fields here to dynamically set tags.", 216 ); 217 218 $fields[] = array( 200 219 "label" => 'Interaction Text', 201 220 "type" => "textarea", … … 288 307 $postData['interactionAlert'] = $alert; 289 308 309 // Client Tags 310 if(!empty($feed['meta']['profilerinteraction_clienttags'])) { 311 // Comma separated tags. Can be merge fields. 312 $postData['clientTag'] = trim(GFCommon::replace_variables($feed['meta']['profilerinteraction_clienttags'], $form, $entry, false, true, false, 'text')); 313 } 314 290 315 return $postData; 291 316 } -
profiler-donations-gravityforms/tags/2.7.1/class-profilerlists-gfaddon.php
r3362220 r3387360 187 187 "choices" => $field_settings, 188 188 "pf_apifield" => "website", 189 ); 190 191 $fields[] = array( 192 "label" => 'Client Acquisition Field', 193 "type" => "select", 194 "name" => "profilerdonation_clientacquisitioncode", 195 "required" => false, 196 "tooltip" => "This field's value should match the Client Acquisition Codes setup within Profiler.", 197 "choices" => $field_settings, 198 "pf_apifield" => "clientAcquiredReason", 189 199 ); 190 200 -
profiler-donations-gravityforms/tags/2.7.1/class-profilerlistsbasic-gfaddon.php
r3335722 r3387360 1 1 <?php 2 2 3 3 class GFProfilerListsBasic extends GFProfilerCommon { 4 4 protected $_slug = "profiler-listsbasic-gf"; -
profiler-donations-gravityforms/tags/2.7.1/class-profilerpostdonate-gfaddon.php
r3211366 r3387360 106 106 $comments = $this->get_field_value($form, $entry, $feed['meta']['profilerdonation_comments']); 107 107 108 $comments .= GFCommon::replace_variables($feed['meta']['profilerdonation_commentsextra'], $form, $entry, false, true, false, 'text');108 $comments .= " " . GFCommon::replace_variables($feed['meta']['profilerdonation_commentsextra'], $form, $entry, false, true, false, 'text'); 109 109 $comments = html_entity_decode($comments); 110 110 … … 114 114 115 115 // Comments 116 $postData['comments'] = $comments;116 $postData['comments'] = trim($comments); 117 117 118 118 $gfEntryId = $this->get_field_value($form, $entry, $feed['meta']['profilerdonation_gfentryid']); -
profiler-donations-gravityforms/tags/2.7.1/index.php
r3368177 r3387360 4 4 Plugin URI: https://mediarealm.com.au/ 5 5 Description: Integrates Gravity Forms with Profiler, enabling donation data and more to be sent directly to Profiler. 6 Version: 2.7. 06 Version: 2.7.1 7 7 8 8 Author: Media Realm -
profiler-donations-gravityforms/tags/2.7.1/readme.txt
r3368177 r3387360 3 3 Tags: gravity-forms, fundraising, crm, donation, profiler 4 4 Requires at least: 6.0 5 Tested up to: 6. 7.15 Tested up to: 6.8.3 6 6 Stable tag: trunk 7 7 Requires PHP: 7.4.0 … … 22 22 23 23 == Changelog == 24 25 = 2.7.1 = 26 27 * Extra Comments Fields: Add space between this and normal comments field 28 * Donate & Interactions: Client Tags field 29 * Mailing List Advanced: Add 'Client Acquisition' field 30 * Interaction: Add Client Acquisition field 31 * Field Select Drop-down Labels: Add parent field name to complex fields, and substitute some blank field names with the field ID 32 * Card Processing (Legacy): Only include JS if a legacy card field is used on the form (note: Gravity Forms have deprecated this field and it may be removed in a future version - https://docs.gravityforms.com/deprecation-of-the-gravity-forms-credit-card-field/. If you use the Stripe field or other modern gateway, there will be no impact.) 24 33 25 34 = 2.7.0 = -
profiler-donations-gravityforms/trunk/cardprocess.php
r1881378 r3387360 1 1 <?php 2 // This is a legacy file to support credit card field processing in Gravity Forms for Profiler Donations. 3 // It works around some historic issues with how Gravity Forms's JS sends the credit card number field. 4 // Now days, this shouldn't be used - we recommend using Stripe or another modern gateway that handles card processing client-side. 2 5 3 6 function profilerdonation_creditcardfilter($field_content, $field) { … … 10 13 11 14 function profilerdonation_cardprocessscript($form) { 12 wp_enqueue_script('profilerdonation_cardprocessscript', plugin_dir_url(__FILE__).'/cardprocess.js'); 15 // If Gravity Forms has a 'creditcard' field, we need to enqueue our card processing script 16 $has_creditcard = false; 17 foreach($form['fields'] as $field) { 18 if($field->type == 'creditcard') { 19 $has_creditcard = true; 20 break; 21 } 22 } 23 24 if(!$has_creditcard) { 25 return; 26 } 27 28 wp_enqueue_script('profilerdonation_cardprocessscript', trailingslashit(plugin_dir_url(__FILE__)).'cardprocess.js'); 13 29 } 14 30 -
profiler-donations-gravityforms/trunk/class-profilercommon.php
r3362220 r3387360 527 527 $field_settings = array(); 528 528 $field_settings['value'] = $inputvalue['id']; 529 $field_settings['label'] = $preface . $inputvalue['label'];529 $field_settings['label'] = $preface . (!empty($field['label']) ? ' ' . $field['label'] . ': ' : '') . $inputvalue['label']; 530 530 $formfields[] = $field_settings; 531 531 } 532 } elseif ($field['type'] == 'hidden') { 533 $formfields[] = array( 534 "value" => $field['id'], 535 "label" => (!empty($field['label']) ? $field['label'] : 'Hidden Field #' . $field['id']) 536 ); 537 } elseif ($field['type'] == 'select') { 538 $formfields[] = array( 539 "value" => $field['id'], 540 "label" => (!empty($field['label']) ? $field['label'] : 'Select Field #' . $field['id']) 541 ); 532 542 } elseif($field["type"] != "creditcard") { 533 543 // Process all fields except credit cards - we don't want them in the list … … 566 576 $formfields[] = array( 567 577 "value" => $field['id'], 568 "label" => $field['label']578 "label" => (!empty($field['label']) ? $field['label'] : 'Hidden Field #' . $field['id']) 569 579 ); 570 580 } … … 682 692 $formfields[] = array( 683 693 "value" => $field['id'], 684 "label" => $field['label']694 "label" => (!empty($field['label']) ? $field['label'] : 'Select Field #' . $field['id']) 685 695 ); 686 696 } … … 717 727 $formfields[] = array( 718 728 "value" => $field['id'], 719 "label" => $field['label']729 "label" => (!empty($field['label']) ? $field['label'] : 'Product Field #' . $field['id']) 720 730 ); 721 731 } -
profiler-donations-gravityforms/trunk/class-profilerdonate-gfaddon.php
r3362220 r3387360 336 336 "required" => false, 337 337 "class" => "merge-tag-support", 338 "tooltip" => "This is extra text to be sent to Profiler in the Comments field. You can include Gravity Forms Merge Fields in this textarea to accept additional user input.",338 "tooltip" => "This is extra text to be sent to Profiler in the Comments field. You can include Gravity Forms Merge Fields in this textarea to accept additional user input.", 339 339 ); 340 340 … … 470 470 "choices" => $field_settings 471 471 ); 472 473 $fields[] = array( 474 "label" => 'Client Tags', 475 "type" => "text", 476 "name" => "profilerdonation_clienttags", 477 "required" => false, 478 "class" => "merge-tag-support", 479 "tooltip" => "This field's value should match the Client Tags setup within Profiler. This list can be comma-separated for multiple tags. Use merge fields here to dynamically set tags.", 480 ); 472 481 473 482 $fields[] = array( … … 477 486 "required" => false, 478 487 "tooltip" => "This field's value should match the Purpose Codes setup within Profiler.", 479 "choices" => $field_settings 488 "choices" => $field_settings, 480 489 ); 481 490 … … 660 669 $postData['clientAcquiredReason'] = $this->getDonationCode($feed, 'clientacquisitioncode', $form); 661 670 } 662 671 672 // Client Tags 673 if(!empty($feed['meta']['profilerdonation_clienttags'])) { 674 // Comma separated tags. Can be merge fields. 675 $postData['clientTag'] = trim(GFCommon::replace_variables($feed['meta']['profilerdonation_clienttags'], $form, $entry, false, true, false, 'text')); 676 } 677 663 678 if($feed['meta']['profilerdonation_donationpurposecode'] !== "") { 664 679 $postData['paymentPupose'] = $this->get_field_value($form, $entry, $feed['meta']['profilerdonation_donationpurposecode']); … … 702 717 if(!empty($feed['meta']['profilerdonation_commentsextra'])) { 703 718 // Extra text to append to comments field 704 $comments .= GFCommon::replace_variables($feed['meta']['profilerdonation_commentsextra'], $form, $entry, false, true, false, 'text');719 $comments .= " " . GFCommon::replace_variables($feed['meta']['profilerdonation_commentsextra'], $form, $entry, false, true, false, 'text'); 705 720 } 706 721 … … 712 727 713 728 // Comments 714 $postData['comments'] = $comments;729 $postData['comments'] = trim($comments); 715 730 716 731 if($this->get_field_value($form, $entry, $feed['meta']['profilerdonation_donationtype']) == "regular") { -
profiler-donations-gravityforms/trunk/class-profilerinteraction-gfaddon.php
r3368177 r3387360 198 198 199 199 $fields[] = array( 200 "label" => 'Client Acquisition Field', 201 "type" => "select", 202 "name" => "profilerinteraction_clientacquisitioncode", 203 "required" => false, 204 "tooltip" => "This field's value should match the Client Acquisition Codes setup within Profiler.", 205 "choices" => $field_settings, 206 "pf_apifield" => "clientAcquiredReason", 207 ); 208 209 $fields[] = array( 210 "label" => 'Client Tags', 211 "type" => "text", 212 "name" => "profilerinteraction_clienttags", 213 "required" => false, 214 "class" => "merge-tag-support", 215 "tooltip" => "This field's value should match the Client Tags setup within Profiler. This list can be comma-separated for multiple tags. Use merge fields here to dynamically set tags.", 216 ); 217 218 $fields[] = array( 200 219 "label" => 'Interaction Text', 201 220 "type" => "textarea", … … 288 307 $postData['interactionAlert'] = $alert; 289 308 309 // Client Tags 310 if(!empty($feed['meta']['profilerinteraction_clienttags'])) { 311 // Comma separated tags. Can be merge fields. 312 $postData['clientTag'] = trim(GFCommon::replace_variables($feed['meta']['profilerinteraction_clienttags'], $form, $entry, false, true, false, 'text')); 313 } 314 290 315 return $postData; 291 316 } -
profiler-donations-gravityforms/trunk/class-profilerlists-gfaddon.php
r3362220 r3387360 187 187 "choices" => $field_settings, 188 188 "pf_apifield" => "website", 189 ); 190 191 $fields[] = array( 192 "label" => 'Client Acquisition Field', 193 "type" => "select", 194 "name" => "profilerdonation_clientacquisitioncode", 195 "required" => false, 196 "tooltip" => "This field's value should match the Client Acquisition Codes setup within Profiler.", 197 "choices" => $field_settings, 198 "pf_apifield" => "clientAcquiredReason", 189 199 ); 190 200 -
profiler-donations-gravityforms/trunk/class-profilerlistsbasic-gfaddon.php
r3335722 r3387360 1 1 <?php 2 2 3 3 class GFProfilerListsBasic extends GFProfilerCommon { 4 4 protected $_slug = "profiler-listsbasic-gf"; -
profiler-donations-gravityforms/trunk/class-profilerpostdonate-gfaddon.php
r3211366 r3387360 106 106 $comments = $this->get_field_value($form, $entry, $feed['meta']['profilerdonation_comments']); 107 107 108 $comments .= GFCommon::replace_variables($feed['meta']['profilerdonation_commentsextra'], $form, $entry, false, true, false, 'text');108 $comments .= " " . GFCommon::replace_variables($feed['meta']['profilerdonation_commentsextra'], $form, $entry, false, true, false, 'text'); 109 109 $comments = html_entity_decode($comments); 110 110 … … 114 114 115 115 // Comments 116 $postData['comments'] = $comments;116 $postData['comments'] = trim($comments); 117 117 118 118 $gfEntryId = $this->get_field_value($form, $entry, $feed['meta']['profilerdonation_gfentryid']); -
profiler-donations-gravityforms/trunk/index.php
r3368177 r3387360 4 4 Plugin URI: https://mediarealm.com.au/ 5 5 Description: Integrates Gravity Forms with Profiler, enabling donation data and more to be sent directly to Profiler. 6 Version: 2.7. 06 Version: 2.7.1 7 7 8 8 Author: Media Realm -
profiler-donations-gravityforms/trunk/readme.txt
r3368177 r3387360 3 3 Tags: gravity-forms, fundraising, crm, donation, profiler 4 4 Requires at least: 6.0 5 Tested up to: 6. 7.15 Tested up to: 6.8.3 6 6 Stable tag: trunk 7 7 Requires PHP: 7.4.0 … … 22 22 23 23 == Changelog == 24 25 = 2.7.1 = 26 27 * Extra Comments Fields: Add space between this and normal comments field 28 * Donate & Interactions: Client Tags field 29 * Mailing List Advanced: Add 'Client Acquisition' field 30 * Interaction: Add Client Acquisition field 31 * Field Select Drop-down Labels: Add parent field name to complex fields, and substitute some blank field names with the field ID 32 * Card Processing (Legacy): Only include JS if a legacy card field is used on the form (note: Gravity Forms have deprecated this field and it may be removed in a future version - https://docs.gravityforms.com/deprecation-of-the-gravity-forms-credit-card-field/. If you use the Stripe field or other modern gateway, there will be no impact.) 24 33 25 34 = 2.7.0 =
Note: See TracChangeset
for help on using the changeset viewer.