Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.

Funny, to me, WP Stripe dev story

  • It all started when I wanted to add ACH support to the Stripe plugin. I asked the WP Stripe Devs for a filter for a hardcoded conditional to allow me to add support for other source prefixes than the ones that they allow (ACH sources are prefixed via ba_ which the plugin doesn't allow). So I posted and asked for a WP filter:

    But as you can see from my second comment in that Github Issue, I realized they hardcoded their conditionals incorrectly. It checks if the string has the source "prefix" anywhere within the string so I can bypass it and use any source string I'd like - I just have to "add a supported prefix" into the string and "cut it out" when it makes it's API call to Stripe.

    I'm just laughing over here because I asked for a filter due to not being able to bypass a hardcoded restriction when that hardcoded restriction was faulty to begin with and I can literally hack it using a fake "prefix" in the middle of the string and cut it out when it's sent.

    Development is so funny sometimes. </end story>

  • Oh, I forgot the kicker of the story:

    They can’t acknowledge that they don’t validate their input fields properly without acknowledging the need for a filter to be added while fixing that same validation code (and they should fix it tbh).

    But if they don’t fix it, I’ll keep hacking their validation form (my WP Plugin works), and if they do fix it - they’ll add that filter for me I’m next to positive which allows me to code a less hacky solution. Win-win. Just took me forever to realize it. 😅