Action: ep_pre_prepare_documents

do_action( 'ep_pre_prepare_documents', $object_ids, $slug )

Fires before documents are prepared to be indexed, in single and bulk indexing.

Lets code that adds data to documents load what it needs for all objects at once, instead of one request per object in prepare_document().

Parameters:
Name Type Description
$object_ids array

IDs of the objects about to be prepared

$slug string

Indexable slug

Since:
  • 5.3.6
Source: