Plugin Directory

Changeset 2442222


Ignore:
Timestamp:
12/18/2020 10:54:49 AM (5 years ago)
Author:
spikkl
Message:

Minor change to search API on blur and keyup

Location:
spikkl-address-lookup/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • spikkl-address-lookup/trunk/assets/js/spikkl-address-lookup.js

    r2441665 r2442222  
    5151
    5252    LookupHandler.prototype.listen = function ( selectedCountryCode ) {
    53         const interactionElements = [ this.$postcode, this.$streetNumber, this.$streetNumberSuffix ];
    54 
    5553        if ( this.isCountryEligibleForLookup( selectedCountryCode ) ) {
    5654
    57             this.$postcode.on( 'keyup blur', this.debounce( this.validatePostcode, 250 ) );
    58             this.$streetNumber.on( 'keyup blur', this.debounce( this.validateStreetNumber, 250 ) );
    59             this.$streetNumberSuffix.on( 'keyup blur', this.debounce( this.validateStreetNumberSuffix, 250 ) );
    60 
    61             $.each( interactionElements, ( index, el ) => {
    62 
    63                 $( el ).on( 'keyup', this.debounce(this.performLookup, 450) );
    64             });
     55            this.$postcode.on( 'blur input', this.debounce( this.validatePostcode, 250 ) );
     56            this.$streetNumber.on( 'blur input', this.debounce( this.validateStreetNumber, 250 ) );
     57            this.$streetNumberSuffix.on( 'blur input', this.debounce( this.validateStreetNumberSuffix, 250 ) );
    6558
    6659            this.applyFieldsLock();
    6760
    6861        } else {
    69             $.each( interactionElements, ( index, el ) => {
    70                 el.off( 'keyup' );
    71             });
     62            this.$postcode.off( 'blur input' );
     63            this.$streetNumber.off( 'blur input' );
     64            this.$streetNumberSuffix.off( 'blur input' );
    7265
    7366            this.hardResetFields();
     
    223216
    224217        if ( json.status === 'ok' && json.results.length >= 1) {
    225             this.$postcode.val( json.results[0].postal_code );
    226             this.$streetNumber.val( json.results[0].street_number );
    227             this.$streetNumberSuffix.val( json.results[0].street_number_suffix );
    228 
    229             this.$street.val( json.results[0].street_name );
    230             this.$city.val( json.results[0].city );
    231 
    232             this.$state.val( json.results[0].administrative_areas[0].abbreviation ).trigger('change');
     218
     219            this.fillDefaultFields( json.results[0] );
     220
    233221        } else {
    234222            let translatedMessage;
     
    255243    };
    256244
     245    LookupHandler.prototype.fillDefaultFields = function ( results ) {
     246        this.$postcode.val( results.postal_code ).change();
     247
     248        this.$street.val( results.street_name ).change();
     249        this.$streetNumber.val( results.street_number ).change();
     250        this.$streetNumberSuffix.val( results.street_number_suffix ).change();
     251
     252        this.$city.val( results.city ).change();
     253
     254        this.$state.val( results.administrative_areas[0].abbreviation ).change();
     255    };
     256
    257257    LookupHandler.prototype.validatePostcode = function () {
    258258        const postcode = this.$postcode.val();
    259259
     260        this.$message.hide();
     261
    260262        if ( postcode === null || postcode === '' ) {
    261             return false;
     263            return;
    262264        }
    263265
    264266        if ( DUTCH_POSTCODE_REGEX.test( postcode ) ) {
    265267            this.$postcodeField.removeClass('woocommerce-invalid');
     268
     269            if ( !this.$postcode.is( ':focus') ) {
     270                this.performLookup();
     271            }
     272
    266273        } else {
    267274            this.$postcodeField.addClass('woocommerce-invalid');
    268275        }
    269 
    270         return false;
    271276    }
    272277
     
    274279        const streetNumber = this.$streetNumber.val();
    275280
     281        this.$message.hide();
     282
    276283        if ( streetNumber === null || streetNumber === '' ) {
    277             return false;
     284            return;
    278285        }
    279286
    280287        if ( DUTCH_STREET_NUMBER_REGEX.test( streetNumber ) ) {
    281             return true;
    282         } else {
    283             this.$message.empty().append( '<li>' + spikkl_params.errors.invalid_street_number + '</li>' );
    284             this.$message.show();
    285         }
    286 
    287         return false;
     288            this.$streetNumberSuffixField.removeClass('woocommerce-invalid');
     289
     290            if ( !this.$postcode.is( ':focus') ) {
     291                this.performLookup();
     292            }
     293        } else {
     294            this.$streetNumberSuffixField.addClass('woocommerce-invalid');
     295        }
    288296    }
    289297
     
    291299        const streetNumberSuffix = this.$streetNumberSuffix.val();
    292300
     301        this.$message.hide();
     302
    293303        if ( DUTCH_STREET_NUMBER_SUFFIX_REGEX.test( streetNumberSuffix ) ) {
    294304            this.$streetNumberSuffixField.removeClass('woocommerce-invalid');
    295             return true;
     305
     306            if ( !this.$postcode.is( ':focus') ) {
     307                this.performLookup();
     308            }
    296309        } else {
    297310            this.$streetNumberSuffixField.addClass('woocommerce-invalid');
    298311        }
    299 
    300         return false;
    301312    };
    302313
  • spikkl-address-lookup/trunk/assets/js/spikkl-address-lookup.min.js

    r2441665 r2442222  
    1 jQuery(function(t){if("undefined"==typeof spikkl_params)return!1;const e=new RegExp("^[1-9][0-9]{3}\\s*(?!sa|sd|ss)[a-z]{2}$","i"),s=new RegExp("^[0-9]{1,5}$"),i=new RegExp("^(?:[a-z])?(?:\\s?[a-z0-9]{1,4})?$","i"),r=function(e){this.cache={},this.xhr=null,this.lookupTimeout=null,this.prefix=e.prefix,this.$countryField=t(e.country+"_field"),this.$stateField=t(e.state+"_field"),this.$cityField=t(e.city+"_field"),this.$streetField=t(e.street+"_field"),this.$postcodeField=t(e.postcode+"_field"),this.$streetNumberField=t(e.street_number+"_field"),this.$streetNumberSuffixField=t(e.street_number_suffix+"_field"),this.$country=this.$countryField.find(":input"),this.$state=this.$stateField.find(":input"),this.$city=this.$cityField.find(":input"),this.$street=this.$streetField.find(":input"),this.$postcode=this.$postcodeField.find(":input"),this.$streetNumber=this.$streetNumberField.find(":input"),this.$streetNumberSuffix=this.$streetNumberSuffixField.find(":input"),this.setHelperElements(),this.$country.on("change",()=>{let t=this.getSelectedCountryCode();this.reorderFields(t),this.listen(t)}),this.$country.trigger("change")};r.prototype.listen=function(e){const s=[this.$postcode,this.$streetNumber,this.$streetNumberSuffix];this.isCountryEligibleForLookup(e)?(this.$postcode.on("keyup blur",this.debounce(this.validatePostcode,250)),this.$streetNumber.on("keyup blur",this.debounce(this.validateStreetNumber,250)),this.$streetNumberSuffix.on("keyup blur",this.debounce(this.validateStreetNumberSuffix,250)),t.each(s,(e,s)=>{t(s).on("keyup",this.debounce(this.performLookup,450))}),this.applyFieldsLock()):(t.each(s,(t,e)=>{e.off("keyup")}),this.hardResetFields(),this.releaseFieldsLock())},r.prototype.applyFieldsLock=function(){this.$postcode.attr("autocomplete","off"),this.$postcode.attr("maxlength",7),this.$street.attr("readonly",!0),this.$city.attr("readonly",!0),this.$state.attr("readonly",!0),this.$stateField.addClass("spikkl-hidden")},r.prototype.releaseFieldsLock=function(){this.$postcode.removeAttr("autocomplete"),this.$postcode.removeAttr("maxlength"),this.$street.removeAttr("readonly"),this.$city.removeAttr("readonly"),this.$state.removeAttr("readonly"),this.$stateField.removeClass("spikkl-hidden")},r.prototype.softResetFields=function(){this.$street.val(""),this.$city.val(""),this.$state.val("").trigger("change"),void 0!==this.$spinner&&this.stopLoading()},r.prototype.hardResetFields=function(){this.$postcode.val(""),this.$streetNumber.val(""),this.$streetNumberSuffix.val(""),void 0!==this.$message&&this.$message.hide(),this.softResetFields()},r.prototype.debounce=function(t,e=450){let s;const i=this;return function(){clearTimeout(s),s=setTimeout(function(){s=null,t.apply(i)},e)}},r.prototype.performLookup=function(){if(!this.isValidPostcode()||!this.isValidStreetNumber()||!this.isValidStreetNumberSuffix())return void this.softResetFields();const t=this.$postcode.val(),e=this.$streetNumber.val(),s=this.$streetNumberSuffix.val();this.startLoading(),this.$message.hide();const i={action:spikkl_params.action,postal_code:encodeURIComponent(t),street_number:encodeURIComponent(e),street_number_suffix:encodeURIComponent(s)};this.cachedGet(i)},r.prototype.cachedGet=function(e){const s=spikkl_params.url+JSON.stringify(Object.values(e));this.xhr&&this.xhr.abort(),this.cache.hasOwnProperty(s)?this.fillFields(this.cache[s]):this.xhr=t.ajax({crossDomain:!0,type:"GET",dataType:"json",timeout:5e3,url:spikkl_params.url,data:e,success:(t,e)=>{if(!t||"success"!==e)return this.fillFields({status:"failed",status_code:"UNAVAILABLE"}),void this.releaseFieldsLock();this.cache[s]=t,this.fillFields(t)}})},r.prototype.startLoading=function(){this.$spinner.show(),this.$postcode.attr("disabled",!0),this.$streetNumber.attr("disabled",!0),this.$streetNumberSuffix.attr("disabled",!0)},r.prototype.stopLoading=function(){this.$spinner.hide(),this.$postcode.attr("disabled",!1),this.$streetNumber.attr("disabled",!1),this.$streetNumberSuffix.attr("disabled",!1)},r.prototype.fillFields=function(t){if(this.stopLoading(),"ok"===t.status&&t.results.length>=1)this.$postcode.val(t.results[0].postal_code),this.$streetNumber.val(t.results[0].street_number),this.$streetNumberSuffix.val(t.results[0].street_number_suffix),this.$street.val(t.results[0].street_name),this.$city.val(t.results[0].city),this.$state.val(t.results[0].administrative_areas[0].abbreviation).trigger("change");else{let e;"ZERO_RESULTS"===t.status_code&&(e=spikkl_params.errors.invalid_address),"INVALID_REQUEST"===t.status_code&&(e=spikkl_params.errors.invalid_postal_code_or_street_number),"UNAVAILABLE"!==t.status_code&&"ACCESS_RESTRICTED"!==t.status_code||(e=spikkl_params.errors.unknown_error,this.releaseFieldsLock()),this.softResetFields(),this.$message.empty().append("<li>"+e+"</li>"),this.$message.show()}},r.prototype.validatePostcode=function(){const t=this.$postcode.val();return null!==t&&""!==t&&(e.test(t)?this.$postcodeField.removeClass("woocommerce-invalid"):this.$postcodeField.addClass("woocommerce-invalid"),!1)},r.prototype.validateStreetNumber=function(){const t=this.$streetNumber.val();return null!==t&&""!==t&&(!!s.test(t)||(this.$message.empty().append("<li>"+spikkl_params.errors.invalid_street_number+"</li>"),this.$message.show(),!1))},r.prototype.validateStreetNumberSuffix=function(){const t=this.$streetNumberSuffix.val();return i.test(t)?(this.$streetNumberSuffixField.removeClass("woocommerce-invalid"),!0):(this.$streetNumberSuffixField.addClass("woocommerce-invalid"),!1)},r.prototype.isValidPostcode=function(){const t=this.$postcode.val();return null!==t&&""!==t&&e.test(t)},r.prototype.isValidStreetNumber=function(){const t=this.$streetNumber.val();return null!==t&&""!==t&&s.test(t)},r.prototype.isValidStreetNumberSuffix=function(){const t=this.$streetNumberSuffix.val();return i.test(t)},r.prototype.setHelperElements=function(){this.$spinner=t("<div>",{id:"spikkl-"+this.prefix+"-spinner",class:"spikkl-loader",style:"display:none;"}),this.$message=t("<ul>",{id:"spikkl-"+this.prefix+"-message",class:"woocommerce-error",style:"display:none;"}),this.$postcode.after(this.$spinner),this.$postcode.before(this.$message)},r.prototype.reorderFields=function(t){this.isCountryEligibleForLookup(t)?(this.$streetNumberField.show(),this.$streetNumberSuffixField.show()):(this.$streetNumberField.hide(),this.$streetNumberSuffixField.hide())},r.prototype.getSelectedCountryCode=function(){return this.$country.val().trim()},r.prototype.isCountryEligibleForLookup=function(t){return t=t||this.getSelectedCountryCode(),spikkl_params.supported_countries.indexOf(t)>=0},t(document.body).bind("wc_address_i18n_ready",function(){"undefined"!=typeof spikkl_billing_fields&&new r(spikkl_billing_fields),"undefined"!=typeof spikkl_shipping_fields&&new r(spikkl_shipping_fields)})});
     1jQuery(function(t){if("undefined"==typeof spikkl_params)return!1;const e=new RegExp("^[1-9][0-9]{3}\\s*(?!sa|sd|ss)[a-z]{2}$","i"),s=new RegExp("^[0-9]{1,5}$"),i=new RegExp("^(?:[a-z])?(?:\\s?[a-z0-9]{1,4})?$","i"),o=function(e){this.cache={},this.xhr=null,this.lookupTimeout=null,this.prefix=e.prefix,this.$countryField=t(e.country+"_field"),this.$stateField=t(e.state+"_field"),this.$cityField=t(e.city+"_field"),this.$streetField=t(e.street+"_field"),this.$postcodeField=t(e.postcode+"_field"),this.$streetNumberField=t(e.street_number+"_field"),this.$streetNumberSuffixField=t(e.street_number_suffix+"_field"),this.$country=this.$countryField.find(":input"),this.$state=this.$stateField.find(":input"),this.$city=this.$cityField.find(":input"),this.$street=this.$streetField.find(":input"),this.$postcode=this.$postcodeField.find(":input"),this.$streetNumber=this.$streetNumberField.find(":input"),this.$streetNumberSuffix=this.$streetNumberSuffixField.find(":input"),this.setHelperElements(),this.$country.on("change",()=>{let t=this.getSelectedCountryCode();this.reorderFields(t),this.listen(t)}),this.$country.trigger("change")};o.prototype.listen=function(t){this.isCountryEligibleForLookup(t)?(this.$postcode.on("blur input",this.debounce(this.validatePostcode,250)),this.$streetNumber.on("blur input",this.debounce(this.validateStreetNumber,250)),this.$streetNumberSuffix.on("blur input",this.debounce(this.validateStreetNumberSuffix,250)),this.applyFieldsLock()):(this.$postcode.off("blur input"),this.$streetNumber.off("blur input"),this.$streetNumberSuffix.off("blur input"),this.hardResetFields(),this.releaseFieldsLock())},o.prototype.applyFieldsLock=function(){this.$postcode.attr("autocomplete","off"),this.$postcode.attr("maxlength",7),this.$street.attr("readonly",!0),this.$city.attr("readonly",!0),this.$state.attr("readonly",!0),this.$stateField.addClass("spikkl-hidden")},o.prototype.releaseFieldsLock=function(){this.$postcode.removeAttr("autocomplete"),this.$postcode.removeAttr("maxlength"),this.$street.removeAttr("readonly"),this.$city.removeAttr("readonly"),this.$state.removeAttr("readonly"),this.$stateField.removeClass("spikkl-hidden")},o.prototype.softResetFields=function(){this.$street.val(""),this.$city.val(""),this.$state.val("").trigger("change"),void 0!==this.$spinner&&this.stopLoading()},o.prototype.hardResetFields=function(){this.$postcode.val(""),this.$streetNumber.val(""),this.$streetNumberSuffix.val(""),void 0!==this.$message&&this.$message.hide(),this.softResetFields()},o.prototype.debounce=function(t,e=450){let s;const i=this;return function(){clearTimeout(s),s=setTimeout(function(){s=null,t.apply(i)},e)}},o.prototype.performLookup=function(){if(!this.isValidPostcode()||!this.isValidStreetNumber()||!this.isValidStreetNumberSuffix())return void this.softResetFields();const t=this.$postcode.val(),e=this.$streetNumber.val(),s=this.$streetNumberSuffix.val();this.startLoading(),this.$message.hide();const i={action:spikkl_params.action,postal_code:encodeURIComponent(t),street_number:encodeURIComponent(e),street_number_suffix:encodeURIComponent(s)};this.cachedGet(i)},o.prototype.cachedGet=function(e){const s=spikkl_params.url+JSON.stringify(Object.values(e));this.xhr&&this.xhr.abort(),this.cache.hasOwnProperty(s)?this.fillFields(this.cache[s]):this.xhr=t.ajax({crossDomain:!0,type:"GET",dataType:"json",timeout:5e3,url:spikkl_params.url,data:e,success:(t,e)=>{if(!t||"success"!==e)return this.fillFields({status:"failed",status_code:"UNAVAILABLE"}),void this.releaseFieldsLock();this.cache[s]=t,this.fillFields(t)}})},o.prototype.startLoading=function(){this.$spinner.show(),this.$postcode.attr("disabled",!0),this.$streetNumber.attr("disabled",!0),this.$streetNumberSuffix.attr("disabled",!0)},o.prototype.stopLoading=function(){this.$spinner.hide(),this.$postcode.attr("disabled",!1),this.$streetNumber.attr("disabled",!1),this.$streetNumberSuffix.attr("disabled",!1)},o.prototype.fillFields=function(t){if(this.stopLoading(),"ok"===t.status&&t.results.length>=1)this.fillDefaultFields(t.results[0]);else{let e;"ZERO_RESULTS"===t.status_code&&(e=spikkl_params.errors.invalid_address),"INVALID_REQUEST"===t.status_code&&(e=spikkl_params.errors.invalid_postal_code_or_street_number),"UNAVAILABLE"!==t.status_code&&"ACCESS_RESTRICTED"!==t.status_code||(e=spikkl_params.errors.unknown_error,this.releaseFieldsLock()),this.softResetFields(),this.$message.empty().append("<li>"+e+"</li>"),this.$message.show()}},o.prototype.fillDefaultFields=function(t){this.$postcode.val(t.postal_code).change(),this.$street.val(t.street_name).change(),this.$streetNumber.val(t.street_number).change(),this.$streetNumberSuffix.val(t.street_number_suffix).change(),this.$city.val(t.city).change(),this.$state.val(t.administrative_areas[0].abbreviation).change()},o.prototype.validatePostcode=function(){const t=this.$postcode.val();this.$message.hide(),null!==t&&""!==t&&(e.test(t)?(this.$postcodeField.removeClass("woocommerce-invalid"),this.$postcode.is(":focus")||this.performLookup()):this.$postcodeField.addClass("woocommerce-invalid"))},o.prototype.validateStreetNumber=function(){const t=this.$streetNumber.val();this.$message.hide(),null!==t&&""!==t&&(s.test(t)?(this.$streetNumberSuffixField.removeClass("woocommerce-invalid"),this.$postcode.is(":focus")||this.performLookup()):this.$streetNumberSuffixField.addClass("woocommerce-invalid"))},o.prototype.validateStreetNumberSuffix=function(){const t=this.$streetNumberSuffix.val();this.$message.hide(),i.test(t)?(this.$streetNumberSuffixField.removeClass("woocommerce-invalid"),this.$postcode.is(":focus")||this.performLookup()):this.$streetNumberSuffixField.addClass("woocommerce-invalid")},o.prototype.isValidPostcode=function(){const t=this.$postcode.val();return null!==t&&""!==t&&e.test(t)},o.prototype.isValidStreetNumber=function(){const t=this.$streetNumber.val();return null!==t&&""!==t&&s.test(t)},o.prototype.isValidStreetNumberSuffix=function(){const t=this.$streetNumberSuffix.val();return i.test(t)},o.prototype.setHelperElements=function(){this.$spinner=t("<div>",{id:"spikkl-"+this.prefix+"-spinner",class:"spikkl-loader",style:"display:none;"}),this.$message=t("<ul>",{id:"spikkl-"+this.prefix+"-message",class:"woocommerce-error",style:"display:none;"}),this.$postcode.after(this.$spinner),this.$postcode.before(this.$message)},o.prototype.reorderFields=function(t){this.isCountryEligibleForLookup(t)?(this.$streetNumberField.show(),this.$streetNumberSuffixField.show()):(this.$streetNumberField.hide(),this.$streetNumberSuffixField.hide())},o.prototype.getSelectedCountryCode=function(){return this.$country.val().trim()},o.prototype.isCountryEligibleForLookup=function(t){return t=t||this.getSelectedCountryCode(),spikkl_params.supported_countries.indexOf(t)>=0},t(document.body).bind("wc_address_i18n_ready",function(){"undefined"!=typeof spikkl_billing_fields&&new o(spikkl_billing_fields),"undefined"!=typeof spikkl_shipping_fields&&new o(spikkl_shipping_fields)})});
  • spikkl-address-lookup/trunk/includes/integrations/spikkl-woocommerce-integration.php

    r2441629 r2442222  
    2121
    2222        private static $_billing = array(
    23             'scope' => '#main',
    2423            'prefix' => 'billing',
    2524            'company' => '#billing_company',
     
    2827            'state' => '#billing_state',
    2928            'postcode' => '#billing_postcode',
    30             'street' => '#billing_address_1',
     29            'street' => '#billing_address_3',
    3130            'street_number' => '#billing_address_4',
    3231            'street_number_suffix' => '#billing_address_5',
     
    3433
    3534        private static $_shipping = array(
    36             'scope' => '#main',
    3735            'prefix' => 'shipping',
    3836            'company' => '#shipping_company',
     
    4139            'state' => '#shipping_state',
    4240            'postcode' => '#shipping_postcode',
    43             'street' => '#shipping_address_1',
     41            'street' => '#shipping_address_3',
    4442            'street_number' => '#shipping_address_4',
    4543            'street_number_suffix' => '#shipping_address_5',
     
    137135            }
    138136
     137            $fields['address_3'] = array(
     138                'label'         => __( 'Street name', 'spikkl' ),
     139                'priority'      => 60,
     140                'required'      => true,
     141                'type'          => 'text'
     142            );
     143
    139144            $fields['address_4'] = array(
    140                 'label' => __( 'Street number', 'spikkl' ),
    141                 'required' => true,
    142                 'type' => 'text',
    143                 'class' => array( 'form-row-first' ),
    144                 'autocomplete' => false,
    145                 'priority' => 50
     145                'label'         => __( 'Street number', 'spikkl' ),
     146                'required'      => true,
     147                'type'          => 'text',
     148                'class'         => array( 'form-row-first' ),
     149                'autocomplete'  => false,
     150                'priority'      => 50
    146151            );
    147152
     
    170175                ),
    171176                'address_1' => array(
    172                     'label' => __( 'Street name', 'spikkl' ),
    173                     'priority' => 70,
    174                     'placeholder' => '',
    175                     'required' => true
     177                    'hidden' => true,
     178                    'required' => false
    176179                ),
    177180                'address_2' => array(
     
    293296
    294297        public function checkout_get_value( $null, $input ) {
    295             if ( in_array( $input, [ 'billing_address_4', 'billing_address_5' ] ) ) {
     298            if ( in_array( $input, [ 'billing_address_3', 'billing_address_4', 'billing_address_5' ] ) ) {
    296299                return WC()->session->get("customer_" . $input);
     300            }
     301
     302            if ( $input === 'billing_house_number' ) {
     303                return WC()->session->get('customer_billing_address_4');
    297304            }
    298305
     
    308315            }
    309316
    310             foreach ( [ 'billing_address_4', 'billing_address_5' ] as $key) {
     317            foreach ( [ 'billing_address_3', 'billing_address_4', 'billing_address_5' ] as $key) {
    311318                if ( isset( $data[$key] ) && $data[$key] ) {
    312319                    WC()->session->set("customer_" . $key, $data[$key]);
     
    321328
    322329            foreach ( ['billing', 'shipping' ] as $group ) {
    323                 $streetName = $group . '_address_1';
     330                $streetName = $group . '_address_3';
    324331                $streetNumber = $group . '_address_4';
    325332                $streetNumberSuffix = $group . '_address_5';
    326333
    327                 $posted[$streetName] .= ' ' . $posted[$streetNumber];
     334                $posted[$group . '_address_1'] = $posted[$streetName] . ' ' . $posted[$streetNumber];
    328335
    329336                if ( isset( $posted[$streetNumberSuffix] ) && $posted[$streetNumberSuffix] ) {
    330                     $posted[$streetName] .= $posted[$streetNumberSuffix];
     337                    $posted[$group . '_address_1'] .= $posted[$streetNumberSuffix];
    331338                }
    332339            }
  • spikkl-address-lookup/trunk/readme.txt

    r2441665 r2442222  
    44Requires at least: 4.4
    55Tested up to: 5.5
    6 Stable tag: 1.5.4
     6Stable tag: 1.5.5
    77Requires PHP: 5.6
    88License: GPLv3
     
    117117= 1.5.4 =
    118118* Fix for reordering fields for unsupported countries
     119
     120= 1.5.5 =
     121* Search API on blur instead of keyup
     122* Change address street key to address_3
  • spikkl-address-lookup/trunk/spikkl-address-lookup.php

    r2441665 r2442222  
    1111 *  Plugin URI: https://www.spikkl.nl/modules
    1212 *  Description: Spikkl Address Lookup validates the Dutch postcode and street number combination during checkout and fills additional address values automatically. Increase the ease-of-use for each of your customers and be assured of up-to-date and valid address data.
    13  *  Version: 1.5.4
     13 *  Version: 1.5.5
    1414 *  Author: Spikkl
    1515 *  Author URI: https://www.spikkl.nl/
     
    4242    final class Spikkl {
    4343
    44         public static $version = '1.5.4';
     44        public static $version = '1.5.5';
    4545
    4646        protected static $_instance;
Note: See TracChangeset for help on using the changeset viewer.