• This is a small code tweak for your consideration. It improves autocomplete compatibility (especially in FF) with a nice checkout page substitute.

    \plugins\adresskorrektur-autocomplete-fuer-woo\autocomplete.js:410

    /**
     * Better compatibility with Fluid Checkout (FC)
     * Wait for ajax load of payment-methods to finish
     *
    **/
    window.addEventListener('load', function(){
    	// wait obj to exist
    	// https://stackoverflow.com/questions/5525071
    	var existCondition = setInterval( function() {
    		if(!(document.getElementById('shipping_address_1') === null)) {
    			clearInterval(existCondition);
    			RpCheckoutAutocomplete_shipping.method.initialize();
    		}
    		if(!(document.getElementById('billing_address_1') === null)) {
    			clearInterval(existCondition);
    			RpCheckoutAutocomplete.method.initialize();
    		}
    	}, 2000 ); // ms. Large enough or it doesn't work
    });
    
    /*
    window.addEventListener('load', function(){
        if(!(document.getElementById('billing_address_1') === null))
            RpCheckoutAutocomplete.method.initialize();
        if(!(document.getElementById('shipping_address_1') === null))
            RpCheckoutAutocomplete_shipping.method.initialize();
    });
    */
  • The topic ‘[CRQ] Better compatibility with Checkout plugin’ is closed to new replies.