Skip to main content

benecaster_guest_manager_after_invite_guest

Action Premium guest-manager

Fires once a guest’s Guest portal link has been emailed and stored. Any earlier link has stopped working.

Parameters

Name Type Default Description
$guest_id int — The guest's post id
$expires_gmt string — When the link stops working, UTC `Y-m-d H:i:s`

Example

// Remind the team two days before a link runs out.
add_action( 'benecaster_guest_manager_after_invite_guest', function ( int $guest_id, string $expires_gmt ): void {
    wp_schedule_single_event( strtotime( $expires_gmt . ' UTC' ) - 2 * DAY_IN_SECONDS, 'my_guest_link_reminder', [ $guest_id ] );
}, 10, 2 );

Notes

Not fired when the email failed: nothing is stored then, and the earlier link still works. Walkthrough: Invite a guest to the Guest portal, or stop their link, from code, and change the invitation email.

Affects

  • POST benecaster-guest-manager/v1/guests/{id}/invitation

Need this built rather than just documented? See our services →