Changeset 2877891
- Timestamp:
- 03/10/2023 01:26:48 PM (3 years ago)
- Location:
- sync-wpforms-jetcrm
- Files:
-
- 3 added
- 2 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/sync-wpforms-jetcrm.php (added)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/sync-wpforms-jetcrm.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sync-wpforms-jetcrm/trunk/readme.txt
r2798079 r2877891 5 5 Tags: lead, wpforms, jetpack crm, contact, customers, automating lead generation, sync, synchronize 6 6 Requires at least: 5.2 7 Tested up to: 6.1. 08 Stable tag: 1.0. 07 Tested up to: 6.1.1 8 Stable tag: 1.0.1 9 9 Requires PHP: 5.6 10 10 License: GPLv2 or later -
sync-wpforms-jetcrm/trunk/sync-wpforms-jetcrm.php
r2798079 r2877891 4 4 * Plugin URI: https://wordpress.org/plugins/sync-wpforms-jetcrm/ 5 5 * Description: Use WPForms to collect leads info and save time by automating your lead generation process. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 5.6 … … 21 21 // Update version. 22 22 register_activation_hook( __FILE__, function() { 23 update_option( 'lswjc_version', '1.0. 0' );23 update_option( 'lswjc_version', '1.0.1' ); 24 24 } ); 25 25 … … 34 34 35 35 foreach( $fields as $field ) { 36 if ( ! in_array( $field['type'], array( 'name', 'email' ) ) ) {37 continue;38 }39 40 36 if ( 'name' === $field['type'] ) { 41 37 list( $first_name, $last_name ) = explode( ' ', sanitize_text_field( $field['value'] ) ); … … 47 43 if ( 'email' === $field['type'] ) { 48 44 $data['zbsc_email'] = sanitize_email( $field['value'] ); 45 } 46 47 if ( 'phone' === $field['type'] ) { 48 $data['zbsc_mobtel'] = sanitize_text_field( $field['value'] ); 49 } 50 51 if ( 'textarea' === $field['type'] ) { 52 $data['zbsc_notes'] = sanitize_textarea_field( $field['value'] ); 53 } 54 55 if ( 'address' === $field['type'] ) { 56 $data['zbsc_addr1'] = sanitize_text_field( $field['address1'] ); 57 $data['zbsc_addr2'] = sanitize_text_field( $field['address2'] ); 58 $data['zbsc_city'] = sanitize_text_field( $field['city'] ); 59 $data['zbsc_county'] = sanitize_text_field( $field['state'] ); 60 $data['zbsc_postcode'] = sanitize_text_field( $field['postal'] ); 61 $data['zbsc_country'] = sanitize_text_field( $field['country'] ); 49 62 } 50 63 } … … 58 71 59 72 add_action( 'wpforms_process_entry_save', 'lswjc_save_wpforms_entry_to_jetpack_crm' ); 73
Note: See TracChangeset
for help on using the changeset viewer.