I am trying to add google reCaptcha for the newsletter.
I have added the following code after <form>
;
<button
class="g-recaptcha"
data-sitekey="6Lfc-WsUAAAAAMvtAnrdwdDGxdiOsuPyFK4wse1D"
data-callback="YourOnSubmitFn">
Submit
</button>
I want to call subscribe()
function for parameter data-callback from file app/code/Magento/Newsletter/Model/Subscriber.php
How to call function from php to .phtml?