Skip to content

Commit

Permalink
Use the Runtime Antlers parser
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Apr 4, 2024
1 parent 2bcf09b commit 97d8c06
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Listeners/SendConfiguredNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Support\Str;
use ReflectionClass;
use ReflectionParameter;
use Statamic\Facades\Antlers;
use Statamic\View\Antlers\Parser;

class SendConfiguredNotifications implements ShouldQueue
Expand Down Expand Up @@ -100,9 +101,7 @@ protected function getNotifiables(array $config, $notification, $event): ?array
return [
[
'channel' => 'mail',
'route' => (new Parser)
->parse($config['to'], $event->order->toAugmentedArray())
->__toString(),
'route' => (string) Antlers::parse($config['to'], $event->order->toAugmentedArray()),
],
];
}
Expand Down

0 comments on commit 97d8c06

Please sign in to comment.