WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Contact Form 7] process hangs after submit with custom action (2 posts)

  1. jester48
    Member
    Posted 1 year ago #

    I have added and action to contact form 7 processing
    add_action('wpcf7_before_send_mail','log_emails_to_file_wpcf7');

    the process completes, the email is logged, but the contact form success message is never processed, the cycling/thinking image just stays there with no indication of success.
    custom code

    function log_emails_to_file_wpcf7($args){
    	if(check_log_directory() && check_log_file()){
    		log_email(
    			array(	'form'		=> $args->title,
    				'from'		=> $args->posted_data['your-name'] . ' <' . $args->posted_data['your-email'] .'>',
    				'to'		=> $args->mail['recipient'],
    				'subject' 	=> $args->posted_data['your-subject'],
    				'body'		=> preg_replace("/\n/", " " , $args->posted_data['your-message']),
    				'url'		=> ''
    			)
    		);
    	}
    return true;
    }

    if I check the debugger it shows the success message but it is not showing on the screen

  2. jester48
    Member
    Posted 1 year ago #

    found it...

    it was a debug script in the log_email function that was giving a bad return

Topic Closed

This topic has been closed to new replies.

About this Topic