• Resolved alirashidy

    (@alirashidy)


    I wanted to use Gumroad embed feature to allow customers to check out without leaving the website, however, I noticed that Combine JavaScript Files is in conflict with Gumroad inline JS code <script src="https://gumroad.com/js/gumroad.js"></script>

    I tried following your pin thread and created this code

    add_filter( 'sgo_javascript_combine_excluded_inline_content', 'js_combine_exclude_inline_script' );
    function js_combine_exclude_inline_script( $exclude_list ) {
        $exclude_list[] = 'https://gumroad.com/js/gumroad.js';
    
        return $exclude_list;
    }

    I tried adding it to Code Snippet and even manually adding it to functions.php file but no luck.

    If something’s wrong with the code or the way I used it please point it out. and I hope that in future updates you add an option to exclude codes within the plugin itself, honestly most caching plugins already have that option, but yours is awesome!

    Thanks.

    • This topic was modified 5 years, 2 months ago by alirashidy.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    We have the option to exclude code from within the plugin itself, it just supports properly added JavaScript and not hardcoded ones. PLease contacty your Gumroad developers to provide you with the proper plugin handle and then chek again the pinned thread for the proper filter syntax.

    Thread Starter alirashidy

    (@alirashidy)

    Hey @hristo-sg

    Thanks for your response, I know that you had the option to exclude from the plugin itself, but as you said its only showing “properly added JavaScript” I don’t think I have a problem with any of these plugins.

    I also don’t think that this is Gumroad’s problem, I think it would have been more helpful if you pointed out if there were any mistakes following your pinned thread.

    I, either stop using Gumroad overlay and increase performance, or use it and lose 3s of loading time, that’s a hard choice!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Combine JavaScript breaks Gumroad JS’ is closed to new replies.