Hi Emmanuel,
Thanks for your great question
This is definitely possible:
This method requires that you edit and replace the file /s2member/includes/templates/buttons/paypal-checkout-button.php every time a new version of s2Member is released, and you upgrade.
To do this, you’ll want to take a look at line 46 of /s2member/includes/templates/buttons/paypal-checkout-button.php. You’ll see there this line:
<input type="image" src="https://www.paypal.com/<?php echo esc_attr (_x ("en_US", "s2member-front paypal-button-lang-code", "s2member")); ?>/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
You’ll want to replace this with the button that you’d like. This can be any input that will submit the form when clicked. No fancy JavaScript is needed.
You can do similar things to this with other template files within s2Member. For standard s2Member buttons, you’ll find the templates under /s2member/includes/templates/buttons/. Otherwise, you need to check out the files under /s2member-pro/includes/templates/.