We recently had a forum post asking if it was possible to upgrade and downgrade free memberships without having to click on the confirm modal in Webflow. This is possible with a little bit of code!
If you would like to take a look at this webflow project, here it is!
Here is the code added to the project that makes it work.
<script>
function clickCheckout() {
$("#memberstack-checkout .ms-checkout-button").click();
}
$("#upgradeMembership").click(function() {
$("#memberstack-checkout").hide();
setTimeout(function(){ clickCheckout(); }, 1000);
});
$( "#downgradeMembership" ).click(function() {
$("#memberstack-checkout").hide();
setTimeout(function(){ clickCheckout(); }, 1000);
});
</script>
Comments
0 comments
Please sign in to leave a comment.