• Resolved Elías

    (@eliasgdj)


    Hello.

    If I activate the JS Combination feature, the field of Stripe for the credit card does not appear. I have tried to use the filter sgo_javascript_combine_excluded_external_paths to exclude external scripts but it does not work. I tried also the non-external one sgo_javascript_combine_exclude.

    I have tried excluding the script handle, the domain, the subdomain… I can’t get it to work ?

    Can you please help me to exclude this script? Have you a more detailed documentation about the filters for developers?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @eliasgdj,

    Please elaborate on how our filter was set and in which file.

    Regards,
    Kristiyan

    Thread Starter Elías

    (@eliasgdj)

    I have a custom plugin with this code:

    add_filter( 'sgo_javascript_combine_excluded_external_paths', 'js_combine_exclude_external_script' );
    function js_combine_exclude_external_script( $exclude_list ) {
        $exclude_list[] = 'stripe.com';
        $exclude_list[] = 'js.stripe.com';
    
        return $exclude_list;
    }

    The plugin is active, and I tried passing the script handle, the full URL, and so on to the $exclude_list array.

    Thank you for your update, @eliasgdj.

    The filter that you provided above should be used only if the script is loaded from an external source.

    In your case, the handle which should be excluded is related to Stripe Extension for Gravity Forms.

    Please replace the filter with the following one:

    add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );
    function js_combine_exclude( $exclude_list ) {
        $exclude_list[] = 'gforms_stripe_frontend';
    
        return $exclude_list;
    }

    Let us know if the issue persists.

    Regards,
    Kristiyan

    Thread Starter Elías

    (@eliasgdj)

    Oh thanks, that works. I only saw the first script, with the handle stripe_v3, which is external and appears first in the code. But now I see the one that you mentioned ???♂?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stripe addon for Gravity Form not working’ is closed to new replies.