Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created July 1, 2026 09:14
Show Gist options
  • Select an option

  • Save xlplugins/c33ddc0a6b83aebde4cabe1d56e60275 to your computer and use it in GitHub Desktop.

Select an option

Save xlplugins/c33ddc0a6b83aebde4cabe1d56e60275 to your computer and use it in GitHub Desktop.
move_street_number_first_ireland
add_action( 'wfacp_footer_after_print_scripts', function () {
?>
<script>
window.addEventListener( 'load', function () {
wfacp_frontend.hooks.addFilter( 'wfacp_country_address_google_format', function ( output, components, instance ) {
if ( output._country !== 'IE' ) {
return output;
}
var number = instance.extractValueByType( components, 'street_number' );
var route = instance.extractValueByType( components, 'route' );
output._address_1 = [ number, route ].filter( Boolean ).join( ' ' );
output._address_2 = '';
return output;
} );
} );
</script>
<?php
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment