• I’m trying to process the post information from my order form without success with WordPress actions. Those are additional fields that I want to use to process an order once CC is approved.

    1) In the following sample the email and function gets fired to early (before approval). I have enabled the email to be sent after the payment is approved in the setup option.

    // sample
    add_action( ‘wpcf7_mail_sent’, ‘update_data’ );
    function update_data( $contact_form ) {

    error_log(“processing order gets fired before CC approval?”);

    if ($title == ‘Privacy Certification Recurring Payment’
    and $submission ) {
    $posted_data = $submission->get_posted_data();

    2) In the following sample (work around) I will try to process post data (create my own order) using another action. This does not work either. No post information from the original form.

    // sample
    add_action(‘cf7pp_payment_successful’, ‘test_function’, 10, 2);
    function test_function($post_id, $tnx_id) {
    error_log(“Post id: $post_id Trans id:$tnx_id”, 0);
    // this output in my log looks ok
    // Post id: 4541 Trans id:sub_XXXXX, referer: https://XXXXX

    // post id appears to be correct but everything else is blank
    $queried_post = get_post($post_id);
    error_log(‘p title: ‘ . $queried_post->post_title,0);
    error_log($queried_post->post_content,0);
    }

    The page I need help with: [log in to see the link]

  • The topic ‘post data from input form’ is closed to new replies.