Title: Function $posted_data not working after 5.2
Last modified: September 22, 2020

---

# Function $posted_data not working after 5.2

 *  [mac33](https://wordpress.org/support/users/mac33/)
 * (@mac33)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/function-posted_data-not-working-after-5-2/)
 * Can you tell us if the next update will fix the problem or if another function
   exists?
    Thank you so much !
 *     ```
        // Create the new wordpress action hook before sending the email from CF7
       add_action( 'wpcf7_before_send_mail', 'my_conversion' );
          function my_conversion( $contact_form ) {
          $submission = WPCF7_Submission::get_instance();
         $form_id = $contact_form->id();
         // Get the post data and other post meta values
       if ( $form_id == 1363 ) {
       if ( $submission ) {
           $posted_data = $submission->get_posted_data();
           $remote_ip = $submission->get_meta( 'remote_ip' );
           $url = $submission->get_meta( 'url' );
           $timestamp = gmdate("Y-m-d H:i:s", $submission->get_meta( 'timestamp' ));
           $title = wpcf7_special_mail_tag( '', '_post_title', '' );
       ```
   

The topic ‘Function $posted_data not working after 5.2’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [mac33](https://wordpress.org/support/users/mac33/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/function-posted_data-not-working-after-5-2/)
 * Status: not resolved