Last active
May 4, 2021 12:51
-
-
Save nikitasinelnikov/5b619974bd30aa3cc18b59c0231a2d4e to your computer and use it in GitHub Desktop.
Ultimate Member: Show only address instead of google map iframe on the member directory
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( 'um_member_directory_before_query', 'my_custom_um_remove_googlemap' ); | |
| function my_custom_um_remove_googlemap() { | |
| if ( ! empty( $_POST['directory_id'] ) ) { | |
| $directory_id = UM()->member_directory()->get_directory_by_hash( $_POST['directory_id'] ); | |
| if ( $directory_id == '{your directory ID here}' ) { | |
| remove_filter( 'um_profile_field_filter_hook__googlemap', 'um_profile_field_filter_hook__googlemap', 99 ); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment