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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. Funny, to me, WP Stripe dev story

Funny, to me, WP Stripe dev story

Scheduled Pinned Locked Moved Discuss
2 Posts 1 Posters 390 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LonkleL Offline
      LonkleL Offline
      Lonkle
      wrote on last edited by
      #1

      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:

      https://github.com/woocommerce/woocommerce-gateway-stripe/issues/1348

      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>

      1 Reply Last reply
      1
      • LonkleL Offline
        LonkleL Offline
        Lonkle
        wrote on last edited by Lonkle
        #2

        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. 😅

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search