Change data before send
-
If you can’t change your webhook schema you can change our sent data before request.
WARNING: Be careful using snippets!
1 – First of all, add a filter:
add_filter( 'ctz_get_data_from_contact_form', 'example_ctz_get_data_from_contact_form' );
2 – And change your data:
function example_ctz_get_data_from_contact_form( $data ) { // EDIT YOUR DATA // For example: multiply a price by 100 because webhook expects price in cents $data['price'] = 100 * (float) ( $data['price'] ?? 0.0 ); return $data; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change data before send’ is closed to new replies.