Skip to content

Commit

Permalink
chore: confirm only the draft submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Jul 18, 2023
1 parent c6e6d0e commit 64fdbb4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/otter-pro/inc/plugins/class-form-emails-storing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1112,11 +1112,11 @@ public function confirm_submission( $response, $request ) {
$post_status = get_post_status( $record_id );

// If the post status is not 'draft', then the submission has already been confirmed.
// if ( 'draft' !== $post_status ) {
// $response->set_code( Form_Data_Response::SUCCESS_EMAIL_SEND );
// $response->mark_as_success();
// return $response;
// }
if ( 'draft' !== $post_status ) {
$response->set_code( Form_Data_Response::SUCCESS_EMAIL_SEND );
$response->mark_as_success();
return $response;
}
$meta = get_post_meta( $record_id, self::FORM_RECORD_META_KEY, true );

if ( ! isset( $meta['dump'] ) || empty( $meta['dump']['value'] ) ) {
Expand Down

0 comments on commit 64fdbb4

Please sign in to comment.