Skip to content

Instantly share code, notes, and snippets.

@pramodjodhani
Created February 14, 2024 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pramodjodhani/5153307bc631219288d892130ecb22d4 to your computer and use it in GitHub Desktop.
Save pramodjodhani/5153307bc631219288d892130ecb22d4 to your computer and use it in GitHub Desktop.
Flux checkout - disable address autofill by browser
/**
* 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