Disable Stripe CSS script not working

Hi, I previously asked on this thread how to disable Stripe and was given the following CSS script:

$(document).ready(function() {
    //Set Disable Stripe as Default
    $(".page-clients-modify #chkpspRestrict_E").prop("checked",true);
});

While this does ensure the disable Stripe box is ticked for each customer it does not actually disable the Pay Online option when the client views the invoice. Can anyone suggest why and what can I do to fix this. I would like the option in the software to default all to Disable Stripe and the activate selectively by customer. Failing that it would be OK if it is disabled for all using a CSS script but I could process payments over the noon using the Pay Online option when I view the invoice.
Any ideas?

Hi @tc5440

Can I just check a few things?

  • You’ve disabled the Stripe account by ticking the box in the modify client screen
  • When you’re viewing the “Pay online” page, the Stripe option is still there - is this you using “Pay Online”, or has a client reported/used this?

Yes you previously gave me the script to do this globally. If I go into the client screen the box is ticked.

When I view Pay Online this is me going into sent mail and looking at the email sent to the client with the invoice link. I click on the link and it takes me to the client’s account side view of the invoice. The Pay Online option is available and if I click it I can process a payment as the client. I have been logged out and operate as the client. This is not correct.
I can also go into the invoice screen as myself and select other options/pay online and here I can process the payment. This is good. This screen is different as it has the option to switch off online payment specifically for this invoice.

That javascript will cause the “disable stripe” box to be ticked when you visit the client details page, but it only ticks the box in your browser - if it’s an existing client that you created before you added the JS then you must actively submit the form to save changes and actually trigger the setting on the server side.

Matthew did mention this on the previous thread:

It does mean that you’d have to modify and resave any existing clients for this to take effect.

2 Likes

Thanks I missed that. Is there something I can add to the script to save that for all clients? New and existing.

Morning @tc5440

Unfortunately, there isn’t a way to bulk apply it to multiple clients, it would need to be done individually by re-saving them.

As @ian_roberts mentioned above, the box will always appear ticked regardless of whether it’s actually enabled or disabled for that particular client (that’s what the script does), so just saving the client will disable this.

Thanks, I will create a feature request to have a box in the Stripe (or other card payment services) settings area to have all clients enabled or disabled for Stripe by default and then users can enable or disable individually. There have been other threads on this as many users want the ability to offer other payment options but only when requested rather than by default.

This topic was automatically closed after 7 days. New replies are no longer allowed.