Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( "propertyhive_property_imported_acquaint_xml", 'acquaint_username_to_office', 10, 2 );
- function acquaint_username_to_office($post_id, $property)
- {
- switch ( (string)$property->username )
- {
- case "Sally Smith":
- case "Gordon Greg":
- case "Tim Tommy":
- {
- update_post_meta( $post_id, '_office_id', 123 ); // replace 123 for the relevant office ID
- break;
- }
- case "Henry Harlem":
- case "Phil Potter":
- {
- update_post_meta( $post_id, '_office_id', 321 ); // replace 321 for the relevant office ID
- break;
- }
- }
- }
Add Comment
Please, Sign In to add comment