• Really happy to find this. I was planning the build of it and realised it already existed. Thanks for saving me so much time!

    Just a few things I’ve noticed:

    Subscription renewals are showing ‘on hold, active, payment complete’ status’ one after another, rather than just the outcome, so you need to be a bit careful with setting up automations based on events.

    Secondly: There’s an API sanitisation line in the file /includes/admin-settings.php that strips anything other than lowercase, numbers and underscores.

    function kwms_sanitize_api_key( $value ) {
    return preg_replace("/[^a-z0-9_]/", '', $value);
    }

    My private key from Klaviyo has uppercase letters so it was failing.

    I just updated the code to this and all is working now

    function kwms_sanitize_api_key( $value ) {
    return trim( sanitize_text_field( $value ) );
    }

    Thanks again! Great plugin and very helpful.

    • This topic was modified 4 months, 3 weeks ago by benmcmahon.
Viewing 1 replies (of 1 total)
  • Plugin Author Peter

    (@petergerard)

    Thanks for catching that issue with the API key sanitizer. I updated the plugin to match your suggestion.

    Regarding Woo’s subscription updates, that’s how the Woo Subs plugin works – every time there’s a renewal it goes to on-hold and then after payment completes, back to active. In some of my other work I use delays before triggering on these events, but for this, I wanted to keep it consistent with the WooCommerce Subscriptions behavior and let the end user decide what they want to do with the events.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this review.