Change the data before sending
The ctz_get_data_from_contact_form filter receives the form data before it is sent. Add the code as explained in Add custom code:
add_filter( 'ctz_get_data_from_contact_form', function( $data, $contact_form ) {
// Only for form 123.
if ( 123 !== $contact_form->id() ) {
return $data;
}
$data['source'] = 'website';
$data['your-name'] = strtoupper( $data['your-name'] ?? '' );
unset( $data['your-phone'] );
return $data;
}, 10, 2 );
Special mail tags have their own filter, ctz_get_data_from_special_mail_tags, with the same arguments. To change the final request, with the body already built, use ctz_post_request_args, as in Change the webhook timeout.
Send your own request
To replace the request of the plugin, return true in ctz_ignore_default_webhook and send yours in the ctz_trigger_webhook action, which receives the data, the webhook URL, the settings and the form:
add_filter( 'ctz_ignore_default_webhook', '__return_true' );
add_action( 'ctz_trigger_webhook', function( $data, $hook_url, $properties, $contact_form ) {
wp_safe_remote_post( $hook_url, array( 'body' => $data ) );
}, 20, 4 );