admin管理员组

文章数量:1292298

We have multiple processors, and people seem to be oblivious to that. I want to add an extra large box with a message in it saying to try the other processors when an order fails with the first processor ONLY on error.

I can't seem to find a hook, and don't want to alter the plugin code directly to change the processor's message. Just want to add extra div.

Any ideas?

We have multiple processors, and people seem to be oblivious to that. I want to add an extra large box with a message in it saying to try the other processors when an order fails with the first processor ONLY on error.

I can't seem to find a hook, and don't want to alter the plugin code directly to change the processor's message. Just want to add extra div.

Any ideas?

Share Improve this question asked Jun 18, 2020 at 1:52 DariusDarius 1171 silver badge12 bronze badges 2
  • What's the use case here - why would trying a different processor help? If Stripe refuses my credit card, for example, then PayPal isn't likely to accept it either. I'd to better to try Stripe again with a different card. Unless your payment providers' APIs aren't reliable I suppose? – Rup Commented Jun 18, 2020 at 11:25
  • High risk processors, they often deny 25% of transactions "just because". Some tend to be oversea processors too and get declined because they're overseas. From experience, if one fails, but they try another, it will usually go through. It's not regular processing. – Darius Commented Jul 1, 2020 at 19:54
Add a comment  | 

1 Answer 1

Reset to default 1

wc_add_notice works during process_payment(). Notices will be collected and displayed for you after loading.

本文标签: Is there a hook in woocommerce for when a payment fails to display a custom error message