Okay, so finally managed to get a working code to share business profile by copying different codes from different websites and some from Osclass existing plugin. If anyone want to add a share button in Business Profile page and who have zero coding experience like me can use this code as it works fine for me on mobile. Its made only for mobile because on desktop anyways users can copy url but if anyone is using PWA then there is no option to copy url.
WhatsApp Share button on Business Profile
CSS code in Theme Customisation
.fa-whatsapp {
color:#fff;
background:
linear-gradient(#25d366,#25d366) 14% 84%/16% 16% no-repeat,
radial-gradient(#25d366 60%,transparent 0);
}
.button123 {
background-color: #25d366;
border: white;
padding: 4px 8px;
display: inline-block;
text-align: center;
text-decoration: none;
font-size: 13px;
font-weight: bold;
margin: 4px 2px;
border-radius: 12px;
}
Code to enter in Business Profile > form > seller.php ( I used it under <div class="bpr-right”>)
<?php
$Url = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://";
$Url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
?>
<div id="share" class="isMobile">
<a href="whatsapp://send?text=<?php echo $Url; ?>" target="_blank" class="button123" style="color:white"><i class="fab fa-whatsapp fa-2x"></i> Share on WhatsApp</a>
</div>
The only problem I see in this code is that the text is not properly align to the centre of the Icon how it is in the Social Share plugin. Attaching the screenshot for the result of the above shared code.