Title: warning after sent message
Last modified: August 31, 2016

---

# warning after sent message

 *  Resolved [yurka94](https://wordpress.org/support/users/yurka94/)
 * (@yurka94)
 * [10 years ago](https://wordpress.org/support/topic/warning-after-sent-message/)
 * after successfully sending a message appears warning: You should switch from 
   using my_cforms_action function to cforms2_after_processing_action WordPress 
   action. in /home/u730139373/public_html/wp-content/plugins/cforms2/my-functions-
   deprecated.php on line 29 .
    Is it critical ? And how to resolve it ?
 * [https://wordpress.org/plugins/cforms2/](https://wordpress.org/plugins/cforms2/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [10 years ago](https://wordpress.org/support/topic/warning-after-sent-message/#post-7292252)
 * The message says how to resolve it. Just read through my-functions.php.txt for
   further information.
 * A warning is by definition never critical.
 *  Thread Starter [yurka94](https://wordpress.org/support/users/yurka94/)
 * (@yurka94)
 * [10 years ago](https://wordpress.org/support/topic/warning-after-sent-message/#post-7292381)
 * Ok .I’ve just do that saying in my-functions.php.txt . I have put this file in
   plugin directory and activate it . And I’ve left one function :
 * > add_action(‘cforms2_after_processing_action’, function ($cformsdata) {
   >  `### Extract Data
   >  ### Note: $cformsdata[‘id’] = ” (empty) for the first form!
   >  $formID = $cformsdata[‘id’];
   >  $form = $cformsdata[‘data’];
   >  ### triggers on your third form
   >  if ( $formID == ‘3’ ) {
   >  ### Do something with the data or not, up to you
   >  $form[‘Your Name’] = ‘Mr./
   > Mrs. ‘.$form[‘Your Name’];
   >  }
   >  ### Send to 3d party or do something else.
   >  ### You can throw an Exception.
   > Its message is printed on the screen. if (!wp_mail(‘you@example.com’, ‘cforms
   > my_action test’, print_r($form,1), ‘From: [you@example.com](https://wordpress.org/support/topic/warning-after-sent-message/you@example.com?output_format=md)’))
   > throw new Exception(‘Mail could not be sent’);
 * But warning still appears . Have I done something wrong ?
 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [10 years ago](https://wordpress.org/support/topic/warning-after-sent-message/#post-7292436)
 * Somewhere you have defined a my_cforms_action function. You should replace it
   with cforms2_after_processing_action, but should not use both of them. I cannot
   tell you where to find my_cforms_action. It is in a custom plugin defined by 
   you or whoever built the webpage. Or you still have the old cformsII version 
   enabled. Then you should disable it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘warning after sent message’ is closed to new replies.

 * ![](https://ps.w.org/cforms2/assets/icon-128x128.png?rev=1010031)
 * [cformsII](https://wordpress.org/plugins/cforms2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cforms2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cforms2/)
 * [Active Topics](https://wordpress.org/support/plugin/cforms2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cforms2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cforms2/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [bgermann](https://wordpress.org/support/users/bgermann/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/warning-after-sent-message/#post-7292436)
 * Status: resolved