• Sajid Manzoor

    (@sajiddesigner)


    Hello,

    See below code:

    
    function action_wpcf7_after_flamingo( $result ) {
     if($result['contact_form_id'] == 329){
       /** SOME CALCULATIONS HERE **/ 
        $url = ; //Url to payment Checkout
         wp_redirect($url);
         exit;
     }
    }
    
    add_action( 'wpcf7_after_flamingo', 'action_wpcf7_after_flamingo', 10, 1 );

    In above function, i am able to do some calculations based on contact form values. After doing some calculations, i want to redirect my browser to another URL but wp_redirect() is not working. Can you please tell me how can i redirect to another URL inside any add_action();

  • The topic ‘wp_redirect not working inside add_action( ‘wpcf7_after_flamingo’)’ is closed to new replies.