WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
wpcf7_mail_sent infinite loop (2 posts)

  1. frOst_EntAngLE
    Member
    Posted 1 year ago #

  2. HarrisITServices
    Member
    Posted 1 year ago #

    I am having the same issue and cannot figure it out. I have tried the following two snippets of code in functions.php and the email sends but the page never redirects. It just stays with the little spinning circle next to the submit button. If anyone has figured this out please let me know as this is driving me nuts.

    add_action('wpcf7_mail_sent', 'wpcf7_redirect_on_submit');
    function wpcf7_redirect_on_submit($wpcf7)
    {
    		wp_redirect( 'http://www.google.com' );
    		exit;
    }
    add_action('wpcf7_mail_sent', 'wpcf7_redirect_on_submit');
    function wpcf7_redirect_on_submit($wpcf7)
    {
    		header( 'Location: http://www.google.com' );
    		exit;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic