SyntaxFix
Write A Post
Hire A Developer
Questions
You should put the print function in your view-details.php file and call it once the file is loaded, by either using
<body onload="window.print()">
or
$(document).ready(function () { window.print(); });