From a548d1fe0fd942c6c02a093fd1005137cd8f6cd4 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Tue, 27 Dec 2022 16:58:49 +0100 Subject: [PATCH] get_post_meta need the post ID --- includes/model/class-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/model/class-post.php b/includes/model/class-post.php index 412de24..cd8f119 100644 --- a/includes/model/class-post.php +++ b/includes/model/class-post.php @@ -71,7 +71,7 @@ class Post { $post = $this->post; if ( 'trash' === get_post_status( $post ) ) { - $permalink = \get_post_meta( $post, 'activitypub_canonical_url', true ); + $permalink = \get_post_meta( $post->ID, 'activitypub_canonical_url', true ); } else { $permalink = \get_permalink( $post ); }