title: Contact form 7 hooks not working at all - New Version
body: <p>I am trying to execute some <code>PHP</code> script with <code>contact form 7</code> but none of the hooks working. I am using a new version of wordpress, contact form plugin. Tried <code>wpcf7_before_send_mail</code> and <code>wpcf7_mail_sent</code></p>
  <p><strong>Sample code in functions.php file:</strong></p>
  <pre><code>add_action('wpcf7_before_send_mail','_wpcf7_mail_sent_function');
  add_action( 'wpcf7_mail_sent', '_wpcf7_mail_sent_function'); 
  
  function _wpcf7_mail_sent_function( $contact_form ) {
      $title = $contact_form-&gt;title;
      $submission = WPCF7_Submission::get_instance();  
      error_log(&quot;test&quot;);
      wp_mail('-----------@gmail.com', 'contact form 7', 'Hooks not working');
      print_r( $submission);
      
      die;
  }
  </code></pre>
  <p>Any clue will be appreciated.</p>