benecaster_guest_manager_before_import
Fires when Import Guests is pressed on Benecaster → Guests → Import Existing Guests (or a request is made to POST benecaster-guest-manager/v1/import), before any guest is created or linked. Not fired for a body whose decisions is not a list, nor for an import refused whole because an email is badly formed or given to two groups.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$decisions |
array |
— | The decisions as sent, one per group: `{ key, action: 'link', guest_id, episode_ids }` or `{ key, action: 'create', name, website, email?, episode_ids }`. Not yet checked against what is waiting |
Example
add_action( 'benecaster_guest_manager_before_import', function ( array $decisions ): void {
my_plugin_log( sprintf( 'Guest import started: %d groups.', count( $decisions ) ) );
} );
Notes
The groups are worked out again after this fires, so a decision for a group that is no longer waiting is reported in the result's failed list rather than imported. Walkthrough: Run or watch the guest import from code.
Affects
- Benecaster → Guests → Import Existing Guests
Need this built rather than just documented? See our services →