Receive push notifications for suspicious activity in WooCommerce

Get instant push notifications for suspicious activities like failed logins and bots in your WooCommerce store using Operational.

Monitor suspicious activity in WooCommerce

Your WooCommerce store can face login attacks, fake orders, or bot traffic. When you see many failed login attempts or strange order patterns, you need to know immediately. Getting push notifications helps you act fast and protect your store.

What is Operational?

Operational is an open-source tool for tracking events in any tech product. You can send structured event data and view them in its dashboard in real time.

Operational in action

Setting up Operational

  1. Go to https://app.operational.co and sign up for a free account.
  2. Create a new project in the dashboard.
  3. Copy the API key from project settings.
  4. Store the API key securely for your WooCommerce site.

PHP code example for sending notifications

The following snippet shows how to send a push notification when you detect multiple failed login attempts in WooCommerce. It posts an event with a name, avatar, and content to Operational.

<?php
// Replace with your API key
$apiKey = 'YOUR_API_KEY';

// Prepare event payload
$payload = [
  'name' => 'Suspicious activity detected',
  'avatar' => '🚨',
  'content' => 'Multiple failed login attempts detected for user john.doe@example.com'
];

// Send event to Operational
$ch = curl_init('https://api.operational.co/v1/events.ingest');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  'Authorization: Bearer ' . $apiKey,
]);
curl_exec($ch);
curl_close($ch);
?>

This code sends an event to Operational whenever you detect suspicious login attempts. It helps you get instant push notifications.

Conclusion

Operational lets you send real-time push notifications for suspicious activity in your WooCommerce store. It saves time and helps you respond quickly to security threats.

Learn more at https://operational.co and try snippets in the playground.