It would be helpful to know how you determined add_action("frmapi_post_response", "your-function", 10, 3) is not firing after you send an API request. Are you adding a break point to examine the values of the parameters $response, $entry, and $form_action? Please share how you performed the diagnostics?
add_action( 'frmapi_post_response', 'frm_save_api_response', 10, 3 ); function frm_save_api_response( $response, $entry, $form_action ) { $status = wp_remote_retrieve_response_code( $response ); FrmProEntryMeta::update_single_field( array( 'entry_id' => $entry->id, 'field_id' => 11, 'value' => $status, ) ); }Then, when field_id is anything other then a '200' I give the user an error and also send a Slack notification to our support team to investigate further. This has been working well so far. Regards, Gavin
add_action( 'frmapi_post_response', 'frm_save_api_response', 10, 3 ); function frm_save_api_response( $response, $entry, $form_action ) { $status = wp_remote_retrieve_response_code( $response ); FrmProEntryMeta::update_single_field( array( 'entry_id' => $entry->id, 'field_id' => 11, 'value' => $status, ) ); }Then, when field_id is anything other then a '200' I give the user an error and also send a Slack notification to our support team to investigate further. This has been working well so far. Regards, Gavin
Please login or Register to submit your answer