render($event_id, $recipient, $data['order'] ?? $data['product'] ?? $data['customer'] ?? null, $data); if (!$email_data) { return false; } // Send email using wp_mail $headers = ['Content-Type: text/html; charset=UTF-8']; $sent = wp_mail($email_data['to'], $email_data['subject'], $email_data['body'], $headers); // Trigger action for logging/tracking do_action('woonoow_email_sent', $event_id, $recipient, $email_data, $sent); return $sent; } /** * Send push notification * * @param string $event_id Event ID * @param string $recipient Recipient type * @param array $data Notification data * @return bool */ private static function send_push($event_id, $recipient, $data) { // Push notification sending will be implemented later // This is a placeholder for future implementation do_action('woonoow_send_push_notification', $event_id, $recipient, $data); return true; } }