Created
October 12, 2021 07:39
-
-
Save ash-f/b7e34766f2bf7df0e6e2757cda7e8a05 to your computer and use it in GitHub Desktop.
WP Fluent Forms custom address format
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
function ff_address_custom_format( $data, $form ){ | |
$fields = $data['fields']; | |
// change the order of array below for your country | |
$data['fields'] = array( | |
'country' => $fields['country'], | |
'zip' => $fields['zip'], | |
'state' => $fields['state'], | |
'city' => $fields['city'], | |
'address_line_1' => $fields['address_line_1'], | |
'address_line_2' => $fields['address_line_2'] | |
); | |
return $data; | |
} | |
add_filter( 'fluentform_rendering_field_data_address', 'ff_address_custom_format', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment