• Resolved alfateam

    (@alfateam)


    Hello,

    We get constant fake orders from our competition, we need to see the real city behind the IP the client placed the order, so we would like to see some field called ‘real city’ on the email that we received on each order. Until now we managed to get the IP by adding this line on function.php but its time consuming to open browser and manually search the city to see if match the client order city. As you may notice we added the real city line but its only extracting what the client selects so its not good, could you please edit the code to get the city name based on IP ? Thank you !

    `function send_customer_city( $order, $sent_to_admin, $plain_text, $email ){
    if( ‘new_order’ == $email->id ){
    echo ‘<br>
    <p>‘.__(‘Client IP’).’: ‘. get_post_meta( $order->id, ‘_customer_ip_address’, true ).'</p>

    <p>‘.__(‘Real City’).’: ‘. get_post_meta( $order->get_id(), ‘_billing_city’, true ).'</p>’;

    }
    }

    • This topic was modified 5 years ago by alfateam.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Client city to be sent on ‘new order’ email possible ?’ is closed to new replies.