Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Nick Young

    (@nickyoung87)

    The payment amount is automatically added by Stripe. You can use the {{amount}} text to change how it shows up on the button: i.e. Pay {{amount}}! or {{amount}} each but there is not a way to remove it entirely at the moment.

    Thread Starter Bojan121

    (@bojan121)

    I’ve browsed around the net a bit, and found a custom implementation that allows for setting a label without amount.

    <button class="btn btn-primary btn-large" id="stripe-demo">Subscribe</button>
    <script src="https://checkout.stripe.com/checkout.js"></script>
    <script>
    var handler = StripeCheckout.configure({
      key: "pk_test_1MCYLYHQDa4DwnBoKd5CqoaP",
      image: "https://stripe.com/img/documentation/checkout/marketplace.png",
      name: "Demo SaaS Site",
      description: "Pro Subscription ($29 per month)",
      panelLabel: "Subscribe",
      allowRememberMe: false
    });
    
    document.getElementById('stripe-demo').addEventListener('click', function(e) {
      handler.open();
      e.preventDefault();
    });
    </script>

    If you check this code, you’ll see that it will have a simple label “Subscribe” without any amount.

    Do you think you can implement this method in your plugin?

    Plugin Contributor Nick Young

    (@nickyoung87)

    The Lite version does not use a custom implementation it just uses the most basic version of the Checkout form that Stripe offers. The Pro version uses a more advanced custom implementation, but I am not sure if this is also an issue in there.

    Did you test the above code and it works to get rid of the amount text for you?

    Thread Starter Bojan121

    (@bojan121)

    I’ve test it and it looks ok, but I’ve just noticed that the custom code didn’t have any defined amount in it. That’s why there is no amount in the label. It’s simply not declared and the api request would likely fail.

    You were right, it’s not possible to remove the amount in the label.

    Plugin Contributor Nick Young

    (@nickyoung87)

    Ah ok thanks for confirming. Sorry about that, maybe it will change in the future and we can allow it also.

    i want stripe integration with my theme buttons i can yes or not, ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Checkout Button Label’ is closed to new replies.