Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Sending an email from activitystream – can we delay it a bit?…

@shanebp

Moderator

> & a customised plugin to allow users to create a post with some custom fields

> 1. wp_posts is updated
> 2. post added to activity stream
> 3. wp_postmeta is updated

And this all happens in the ‘customized plugin’ ?
As well as your email function ? Which you call last ?

If you aren’t sure which function is sending out your email, look at wp_mail.
It has an apply_filters hook at the top.
At least you can exclude or confirm that.
( And the whole function is pluggable – so you can over-ride it. )

Long Shot – try:
-setting your cpt to draft status
-do your activity and postmeta handling
-set your cpt status to publish
-send your email

Skip to toolbar