{"id":1305,"date":"2012-05-07T04:43:26","date_gmt":"2012-05-07T04:43:26","guid":{"rendered":"http:\/\/www.vishmax.com\/en\/?p=1305"},"modified":"2012-05-19T10:26:02","modified_gmt":"2012-05-19T10:26:02","slug":"send-email-notification-in-wordpress-when-user-updates-profile","status":"publish","type":"post","link":"https:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/","title":{"rendered":"Send Email Notification in WordPress when User Updates Profile"},"content":{"rendered":"<p>WordPress have default functions send emails to users, besides using that we can also write custom functions. Here is a WordPress snippet which will send email notification to user when they updated their profile. To enable email notification for profile updates you need to copy and paste the following code to your functions.php. Once added the code your WP site can send emails to users for their profile updates.<\/p>\n<pre lang=\"php\">\r\n<?php \r\nfunction user_profile_update( $user_id ) {\r\n        $site_url = get_bloginfo('wpurl');\r\n        $user_info = get_userdata( $user_id );\r\n        $to = $user_info->user_email;\r\n        $subject = \"Profile Updated: \".$site_url.\"\";\r\n        $message = \"Hi \" .$user_info->display_name . \"\\nYour profile has been successfully updated!\";\r\n        wp_mail( $to, $subject, $message);\r\n}\r\nadd_action( 'profile_update', 'user_profile_update', 10, 2);\r\n?>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>WordPress have default functions send emails to users, besides using that we can also write custom functions. Here is a WordPress snippet which will send email notification to user when they updated their profile. To enable email notification for profile updates you need to copy and paste the following code to your functions.php. Once added [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[44],"tags":[72,49,83],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Send Email Notification in WordPress when User Updates Profile - Vishmax.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Send Email Notification in WordPress when User Updates Profile - Vishmax.com\" \/>\n<meta property=\"og:description\" content=\"WordPress have default functions send emails to users, besides using that we can also write custom functions. Here is a WordPress snippet which will send email notification to user when they updated their profile. To enable email notification for profile updates you need to copy and paste the following code to your functions.php. Once added [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/\" \/>\n<meta property=\"og:site_name\" content=\"Vishmax.com\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-07T04:43:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-05-19T10:26:02+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93\"},\"headline\":\"Send Email Notification in WordPress when User Updates Profile\",\"datePublished\":\"2012-05-07T04:43:26+00:00\",\"dateModified\":\"2012-05-19T10:26:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/\"},\"wordCount\":79,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\"},\"keywords\":[\"Code Library\",\"WordPress\",\"WP Snippets\"],\"articleSection\":[\"Labs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/\",\"url\":\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/\",\"name\":\"Send Email Notification in WordPress when User Updates Profile - Vishmax.com\",\"isPartOf\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#website\"},\"datePublished\":\"2012-05-07T04:43:26+00:00\",\"dateModified\":\"2012-05-19T10:26:02+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.vishmax.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send Email Notification in WordPress when User Updates Profile\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#website\",\"url\":\"http:\/\/www.vishmax.com\/en\/\",\"name\":\"Vishmax.com\",\"description\":\"Software Company in Calicut for Web Design and eCommerce\",\"publisher\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.vishmax.com\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\",\"name\":\"Vishmax.com\",\"url\":\"http:\/\/www.vishmax.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png\",\"contentUrl\":\"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png\",\"width\":150,\"height\":50,\"caption\":\"Vishmax.com\"},\"image\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/www.vishmax.com\/en\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Send Email Notification in WordPress when User Updates Profile - Vishmax.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/","og_locale":"en_US","og_type":"article","og_title":"Send Email Notification in WordPress when User Updates Profile - Vishmax.com","og_description":"WordPress have default functions send emails to users, besides using that we can also write custom functions. Here is a WordPress snippet which will send email notification to user when they updated their profile. To enable email notification for profile updates you need to copy and paste the following code to your functions.php. Once added [&hellip;]","og_url":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/","og_site_name":"Vishmax.com","article_published_time":"2012-05-07T04:43:26+00:00","article_modified_time":"2012-05-19T10:26:02+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/#article","isPartOf":{"@id":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/"},"author":{"name":"admin","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93"},"headline":"Send Email Notification in WordPress when User Updates Profile","datePublished":"2012-05-07T04:43:26+00:00","dateModified":"2012-05-19T10:26:02+00:00","mainEntityOfPage":{"@id":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/"},"wordCount":79,"commentCount":0,"publisher":{"@id":"http:\/\/www.vishmax.com\/en\/#organization"},"keywords":["Code Library","WordPress","WP Snippets"],"articleSection":["Labs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/","url":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/","name":"Send Email Notification in WordPress when User Updates Profile - Vishmax.com","isPartOf":{"@id":"http:\/\/www.vishmax.com\/en\/#website"},"datePublished":"2012-05-07T04:43:26+00:00","dateModified":"2012-05-19T10:26:02+00:00","breadcrumb":{"@id":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.vishmax.com\/en\/labs\/send-email-notification-in-wordpress-when-user-updates-profile\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.vishmax.com\/en\/"},{"@type":"ListItem","position":2,"name":"Send Email Notification in WordPress when User Updates Profile"}]},{"@type":"WebSite","@id":"http:\/\/www.vishmax.com\/en\/#website","url":"http:\/\/www.vishmax.com\/en\/","name":"Vishmax.com","description":"Software Company in Calicut for Web Design and eCommerce","publisher":{"@id":"http:\/\/www.vishmax.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.vishmax.com\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/www.vishmax.com\/en\/#organization","name":"Vishmax.com","url":"http:\/\/www.vishmax.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png","contentUrl":"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png","width":150,"height":50,"caption":"Vishmax.com"},"image":{"@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g","caption":"admin"},"url":"https:\/\/www.vishmax.com\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts\/1305"}],"collection":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/comments?post=1305"}],"version-history":[{"count":0,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts\/1305\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/media?parent=1305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/categories?post=1305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/tags?post=1305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}