When you have both ActivityPub and Webmentions plugins installed, every post or reply you create in WordPress is sent as both an ActivityPub activity and a Webmention ping, which happened to my reply to this blog post about his awesome Daymark plugin:

I posted the reply using my FediTap web app that posts via the new ActivityPub API in the ActivityPub plugin, which means that:
- ActivityPub received my reply from FediTap over REST API.
- ActivityPub turned the
object.inReplyTointo aactivitypub/replyblock and placed it at the top of the post content. - ActivityPub sent the reply to Jeff’s ActivityPub inbox which published it as a comment on the post.
- Webmentions plugin scheduled a one-time cron job to send a webmention ping as well.
When Jeff’s site received the messages:
- ActivityPub processed the incoming
Createactivity as a comment on thatobject.inReplyTopost, stored the reply object ID insource_idand the public URL of it insource_urlcomment meta. - Webmention processed the incoming HTTP payload, matched
source_urlwith webmention’ssourceand replaced the comment body with it’s own version that includes the URL from theactivitypub/replyblock at the top.
I’m not sure if this is the desired behavior.
You can use the following snippet to disable the Webmention pings for posts that are also replies to ActivityPub objects:
add_action( 'activitypub_outbox_created_post', function ( $post_id, $activity ) {
if ( ! empty( $activity['object']['inReplyTo'] ) ) {
update_post_meta( $post_id, 'webmentions_disabled_pings', true );
}
}, 10, 2 );
We must set the post meta because the webmention processing happen asynchronously on cron so it has to be persisted.