Skip to content

Commit

Permalink
fix use of options class
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Jan 21, 2020
1 parent 997486d commit 671e362
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function listen() {
$data = array(
'message' => $this->get_response_message(),
'success' => $this->success,
'redirect_url' => $this->success ? $this->options->get( 'redirect' ) : '',
'redirect_url' => $this->success ? $options['redirect']: '',
);

wp_send_json( $data );
Expand All @@ -132,7 +132,7 @@ public function listen() {

if( $this->success ) {
// should we redirect
$redirect_url = $this->options->get( 'redirect' );
$redirect_url = $options['redirect'];
if( ! empty( $redirect_url ) ) {
wp_redirect( $redirect_url );
exit;
Expand Down Expand Up @@ -441,7 +441,6 @@ public function output_html() {
</form>
<?php echo $this->get_response_message_html(); ?>
</div>

<!-- / Mailchimp Top Bar -->
</div>
<?php
Expand Down

0 comments on commit 671e362

Please sign in to comment.