mercredi 3 février 2016

How to detect import type from All Import `pmxi_saved_post` action?

I'm writing some functions that need to perform actions on users after I import them to Wordpress using the "WP All Import" plugin.

It seems that the plugin doesn't have actions defined for each type of import (Users, Posts, Images, etc) and all imports utilize the pmxi_saved_post action to handle things that need to happen after each record is saved.

How do you determine which type of import is being performed, so as to not accidentally run actions that are supposed to be for Users (such as, sending a welcome e-mail) on Posts (which may have a colliding ID)?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire