Created
April 9, 2025 18:56
-
-
Save propertyhive/f00cd3904dcba8906a949e836bfc96ae to your computer and use it in GitHub Desktop.
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( "propertyhive_property_imported_loop_json", 'set_negotiator_from_loop', 10, 3 ); | |
function set_negotiator_from_loop( $post_id, $property, $import_id ) | |
{ | |
// Negotiator A | |
if ( $import_id == 111 ) // change 111 for import ID | |
{ | |
update_post_meta( $post_id, '_negotiator_id', 1 ); // change 1 for WP user ID | |
} | |
// Negotiator B | |
if ( $import_id == 222 ) // change 222 for import ID | |
{ | |
update_post_meta( $post_id, '_negotiator_id', 2 ); // change 2 for WP user ID | |
} | |
// Negotiator C | |
if ( $import_id == 333 ) // change 333 for import ID | |
{ | |
update_post_meta( $post_id, '_negotiator_id', 3 ); // change 3 for WP user ID | |
} | |
/// and so forth | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment