Guest User

Untitled

a guest
Sep 25th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <?php
  2. add_action( 'gravityflow_post_webhook', 'sh_action_gravityflow_post_webhook', 10, 4 );
  3. function sh_action_gravityflow_post_webhook( $response, $args, $entry, $current_step ) {
  4. //Replace step ID and fields for calculation to match your use case.
  5. if ( $current_step->get_id() == 77 && is_numeric( $entry['3'] ) && is_numeric( $entry['16'] ) ) {
  6. $entry['14'] = round( $entry['3'] * $entry['16'], 2);
  7. $result = GFAPI::update_entry( $entry );
  8. }
  9. }
Add Comment
Please, Sign In to add comment