From a3ddd9a6d51f802c4ced427e87045857a9e730a3 Mon Sep 17 00:00:00 2001 From: Sebastian Thulin Date: Mon, 2 Dec 2024 13:48:17 +0100 Subject: [PATCH] fix: change to action. --- source/php/LinkUpdater/LinkUpdater.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/php/LinkUpdater/LinkUpdater.php b/source/php/LinkUpdater/LinkUpdater.php index ea27fdc..e5e402b 100644 --- a/source/php/LinkUpdater/LinkUpdater.php +++ b/source/php/LinkUpdater/LinkUpdater.php @@ -23,7 +23,7 @@ public function __construct(private WpService $wpService, private Config $config public function addHooks(): void { //Fetches the previous permalink before the post is updated - $this->wpService->addFilter('pre_post_update', [$this, 'beforeUpdateLinks'], 10, 2); + $this->wpService->addAction('pre_post_update', [$this, 'beforeUpdateLinks'], 10, 2); //Updates the links in the post content if the post name has changed $this->wpService->addAction('post_updated', [$this, 'updateLinks'], 10, 3);