rtec_after_form_submission_success
is an action that runs after a valid registration is completed, the entry has been added to the database, and any emails have been sent. It accepts one parameter which is the object associated with the registration group.
Usage
<?php add_action( 'rtec_after_form_submission_success', 'function_name' ); ?>
Changelog
Pro
2.22 – introduced
Example: Dump out data related to a registration group
/**
* @param \Roundupwp\Registration\RegistrationGroup $registration_group Group of connected registrations.
*/
function ru_custom_after_form_submission_success( $registration_group ) {
$sanitized_data = $registration_group->get_main()->get_registration_data();
$entry_id = $registration_group->get_main()->get_entry_id();
$event_meta = rtec_get_event_meta( $sanitized_data['event_id'] );
// Dump out data.
var_dump( $sanitized_data, $entry_id, $event_meta );
}
add_action( 'rtec_after_form_submission_success', 'ru_custom_after_form_submission_success', 10, 1 );