update SlackNotifySubscriber.php

This commit is contained in:
Marko
2023-09-29 17:27:50 +02:00
parent 034808cc67
commit 9445ec23ca
3 changed files with 10 additions and 8 deletions

View File

@@ -45,13 +45,9 @@ class SlackNotifySubscriber implements EventSubscriberInterface
{
$slack = new Client($this->slackWebhookUrl);
$order = $event->getControllerResult();
$method = $event->getRequest()->getMethod();
// $this->logger->info('SlackNotifySubscriber: ' . $method);
//$this->logger->info('SlackNotifySubscriber: ' . $order);
//wenn es keine Bestellung ist oder es kein POST Request ist, dann return
if (!$order instanceof Order || Request::METHOD_POST !== $method) {
return;