| @@ -89,8 +89,11 @@ | ||
| 89 | 89 | // When it shows a message, it adds a &frmstrp= param to the URL. |
| 90 | 90 | $redirect = FrmStrpLiteAuth::return_url( compact( 'form', 'entry' ) ); |
| 91 | 91 | $is_message_redirect = str_contains( $redirect, 'frmstrp=' ); |
| 92 | 92 | |
| 93 | + // Call this before all redirects so the referer is always deleted. | |
| 94 | + $referer_url = $this->get_referer_url( $entry->id ); | |
| 95 | + | |
| 93 | 96 | if ( $this->url_is_external( $redirect ) || ! $is_message_redirect ) { |
| 94 | 97 | wp_redirect( $redirect ); |
| 95 | 98 | die(); |
| 96 | 99 | } |
| @@ -95,10 +98,8 @@ | ||
| 95 | 98 | die(); |
| 96 | 99 | } |
| 97 | 100 | |
| 98 | 101 | // $redirect may not include the whole link to the form, breaking the redirect as iDEAL/Sofort have an additional redirect. |
| 99 | - $referer_url = $this->get_referer_url( $entry->id ); | |
| 100 | - | |
| 101 | 102 | if ( is_string( $referer_url ) ) { |
| 102 | 103 | $parts = explode( '?', $redirect, 2 ); |
| 103 | 104 | |
| 104 | 105 | if ( 2 === count( $parts ) ) { |