Created
July 1, 2026 09:14
-
-
Save xlplugins/c33ddc0a6b83aebde4cabe1d56e60275 to your computer and use it in GitHub Desktop.
move_street_number_first_ireland
This file contains hidden or 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
| 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