It converts line breaks into <br/> and double breaks into paragraphs. Used to identify text formatted with newlines and replace double line breaks with HTML paragraph tags.


wpautop( string $text, bool $br = true ): string
wpautop( string $text, bool $br = true ): string

Example


global $product;
$descriptionpro_batch = $product->short_description;
echo wpautop( $descriptionpro_batch );

And also for remove next lines means print as single line string then you can use below code


remove_filter( 'the_content', 'wpautop' );