Receive push notifications when a user updated their profile in Wordpress

Learn how to send real-time push notifications when a user updates their Wordpress profile using Operational.

What is profile update notification in Wordpress

Keeping track of user profile changes helps you stay informed.

When a user updates their profile in Wordpress, you can send a push notification to your team or admins.

This lets you monitor changes in real time.

Tracking Profile Updates with Operational

Operational in Action

Operational is an open-source event tracking tool.

It captures events from any tech product.

You can use it to receive notifications when users update profiles.

It lets you view events in a simple dashboard.

Setting up Operational

  1. Go to app.operational.co and sign up.
  2. Create a new project in the dashboard.
  3. Copy your API key from the project settings.
  4. Install the Operational SDK in your project.

Implementing Notifications in PHP

<?php
add_action('profile_update', function($user_id) {
  $user_info = get_userdata($user_id);

  $payload = [
    'name' => 'User Profile Updated',
    'avatar' => '🔄',
    'content' => $user_info->display_name . ' updated their profile'
  ];

  $ch = curl_init('https://api.operational.co/events');
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY',
    'Content-Type: application/json'
  ]);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
  curl_exec($ch);
  curl_close($ch);
});
?>

This code hooks into Wordpress when a user updates their profile.

It builds a payload and sends it to Operational to trigger a push notification.

Conclusion

Operational saves time by capturing profile update events in real time.

You can avoid manual scripts and focus on your product.

Learn more at https://operational.co.

Try the playground to experiment with snippets.