Add solution for 3rd party integration and managing errors
-
I have reverse engineered a piece of your plugin.
In the file includes/classes.php, in the row 480, where there’s a control in skip_mail parameter, I have added this code:
global $wpcf7; if ( $this->skip_mail ) { if(isset($wpcf7->result["valid"])) if($wpcf7->result["valid"] == 1) return true; else return false; else return true; }
In this mode, when there is a control with 3rd party integration, it’s possible to set:
global $wpcf7; $wpcf7->result["valid"] = 0; //in case of error $cf7->skip_mail = true;
in order to declare the variable “mail_sent” on ajax response to false. Again, with this code:
$cf7->messages["mail_sent_ng"] = "Some error occured!";
it’s possible to customize the message on return from Server.
That’s it!
I hope this my little editing can help someone!!!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add solution for 3rd party integration and managing errors’ is closed to new replies.