Plugin Directory

Changeset 2877891


Ignore:
Timestamp:
03/10/2023 01:26:48 PM (3 years ago)
Author:
kroozz
Message:

Adding tag 1.0.1

Location:
sync-wpforms-jetcrm
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • sync-wpforms-jetcrm/trunk/readme.txt

    r2798079 r2877891  
    55Tags: lead, wpforms, jetpack crm, contact, customers, automating lead generation, sync, synchronize
    66Requires at least: 5.2
    7 Tested up to: 6.1.0
    8 Stable tag: 1.0.0
     7Tested up to: 6.1.1
     8Stable tag: 1.0.1
    99Requires PHP: 5.6
    1010License: GPLv2 or later
  • sync-wpforms-jetcrm/trunk/sync-wpforms-jetcrm.php

    r2798079 r2877891  
    44 * Plugin URI:        https://wordpress.org/plugins/sync-wpforms-jetcrm/
    55 * Description:       Use WPForms to collect leads info and save time by automating your lead generation process.
    6  * Version:           1.0.0
     6 * Version:           1.0.1
    77 * Requires at least: 5.2
    88 * Requires PHP:      5.6
     
    2121// Update version.
    2222register_activation_hook( __FILE__, function() {
    23     update_option( 'lswjc_version', '1.0.0' );
     23    update_option( 'lswjc_version', '1.0.1' );
    2424} );
    2525
     
    3434
    3535    foreach( $fields as $field ) {
    36         if ( ! in_array( $field['type'], array( 'name', 'email' ) ) ) {
    37             continue;
    38         }
    39 
    4036        if ( 'name' === $field['type'] ) {
    4137            list( $first_name, $last_name ) = explode( ' ', sanitize_text_field( $field['value'] ) );
     
    4743        if ( 'email' === $field['type'] ) {
    4844            $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'] );
    4962        }
    5063    }
     
    5871
    5972add_action( 'wpforms_process_entry_save', 'lswjc_save_wpforms_entry_to_jetpack_crm' );
     73
Note: See TracChangeset for help on using the changeset viewer.