Created
August 5, 2025 13:00
-
-
Save g-maclean/29a8b3caa890aa790a87934d7ca3f623 to your computer and use it in GitHub Desktop.
PropertyHive - Remove office and location from reg form
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_filter( 'propertyhive_applicant_registration_form_fields', 'remove_location_and_hide_office_id', 10, 1 ); | |
| function remove_location_and_hide_office_id( $form_controls ) { | |
| // Remove 'location' from the form controls | |
| if ( isset($form_controls['location']) ) { | |
| unset($form_controls['location']); | |
| } | |
| // Hide 'office_id' from the form controls | |
| if ( isset($form_controls['office_id']) ) { | |
| $form_controls['office_id']['type'] = 'hidden'; | |
| $form_controls['office_id']['value'] = ''; | |
| } | |
| return $form_controls; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment