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);