save_post hook is not called when post is saved

A quick way of debugging the save function before redirection – is to

die(print_r($post_id)); // or var_dump($post_id);

this will stop all PHP from continuing and is fast for small debugging where you don’t need an entire log.

throw that into your function, and see what happens in it – change the variable to see if you are getting what you are expecting.

EDIT ———–

what i mean is :

add_action( 'save_post', 'new_blog_details_send', 10, 1);
function new_blog_details_send( $post_id ) {
    
    wp_die(print_r($post_id)); //just another way of stopping - for wordpress

    ///Getting blog post details///
    $blog_title = get_the_title( $post_id );
    $blog_link = get_permalink( $post_id ); 
    $blog_text = get_post_field('post_content', $post_id);

    ///Sending data to portal////
    $post_url="http://example.com/blog_update";
    $body = array(
            'blog_title' => $blog_title,
            'blog_link' => $blog_link,
            'blog_text' => $blog_text
    );

    //error_log($body);

    $request = new WP_Http();
    $response = $request->post( $post_url, array( 'body' => $body ) );

}

If it is still running normally after you put this in, the function is not called.