Created
February 14, 2024 08:05
-
-
Save pramodjodhani/5153307bc631219288d892130ecb22d4 to your computer and use it in GitHub Desktop.
Flux checkout - disable address autofill by browser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flux checkout - disable autofill. | |
* | |
* @return void | |
*/ | |
function iconic_flux_disable_autofill_address() { | |
if ( ! is_checkout() ) { | |
return; | |
} | |
?> | |
<script> | |
jQuery(document).ready(function() { | |
window.setTimeout(() => { | |
jQuery('#billing_address_search').attr('autocomplete', 'noone'); | |
}, 1000); | |
}) | |
</script> | |
<?php | |
} | |
add_filter( 'wp_footer', 'iconic_flux_disable_autofill_address', 150 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment