Contact Form 7: Add Country By IP Shortcode To Email

Copy this code to your theme’s functions.php and use [country_by_ip] shortcode/tag ANYWHERE to print the visitor’s country by his IP address with CF7. It uses ipinfo.io’s free API, detects the visitor’s IP address and adds CF7 shortcode/tag to use in the email body for example. Enjoy!

3rd Party Integration: Add Geolocation To Service Posts

Copy this code to your theme’s functions.php and each call your ‘3rd party integrations’ plugin will make after a visitor submission (For CRMs API, for example), it will include the Country, City & State of the visitor by his IP address.  

Contact Form 7: Overwrite/Manipulate Posted Data Before Sending Email

Copy this code to your theme’s functions.php to manipulate the posted data by the visitor, update, add or remove fields and such. There’s a lot that you can do with it!

WooCommerce: Show Contact Form When Product Is Out Of Stock

Paste those into your theme’s functions.php and edit the contact form shortcode inside do_shortcode function.

Prevent Contact Form 7 (CF7) From Sending Email

Put it in your theme’s functions.php and update the form id (999999) to your CF7’s form ID.