| @@ -81,25 +81,12 @@ | ||
| 81 | 81 | 'code' => $error->getCode(), |
| 82 | 82 | 'message' => $error->getMessage(), |
| 83 | 83 | 'form_id' => $formId, |
| 84 | 84 | 'time' => time(), |
| 85 | - 'hide_confirmation' => $error->shouldShowToVisitor( $formId ), | |
| 85 | + 'hide_confirmation' => (bool) apply_filters( 'f12_cf7_doubleoptin_show_validation_error', false ), | |
| 86 | 86 | ), |
| 87 | 87 | self::TRANSIENT_TTL |
| 88 | 88 | ); |
| 89 | - } | |
| 90 | - | |
| 91 | - /** | |
| 92 | - * Drop the stored error for the current client. | |
| 93 | - * | |
| 94 | - * For integrations that already put the message into the form's own | |
| 95 | - * response (CF7 abort, Elementor error). Without this the toast shows | |
| 96 | - * the same sentence a second time next to it. | |
| 97 | - * | |
| 98 | - * @return void | |
| 99 | - */ | |
| 100 | - public static function forget(): void { | |
| 101 | - delete_transient( self::getTransientKey() ); | |
| 102 | 89 | } |
| 103 | 90 | |
| 104 | 91 | /** |
| 105 | 92 | * Retrieve and delete the stored error for the current client. |