• On our checkout page, we have every box checked in the Asset CleanUp Options panel to disable it on that page. However the version number is being appended to a payment gateway script which causes the gateway to break.

    When the plugin is active the script tag is output as

    <script src='https://js.authorize.net/v1/Accept.js?ver=5.5.1' id='wc-authorize-net-cim-accept-inline-js'></script>

    When the plugin is completely disabled site-wide, the tag is output as

    <script src='https://js.authorize.net/v1/Accept.js' id='wc-authorize-net-cim-accept-inline-js'></script>

    Is it possible to disable this behavior? Unfortunately that difference is enough to break the gateway. The plugin in question is https://www.skyverge.com/product/woocommerce-authorize-net-cim/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @madjax I have a suspicion this is not an Asset CleanUp thing because there’s no option to string query strings from static resources. Moreover, external scripts like this one (not on the same domain where your WordPress installation is) are also ignored from any optimization such as minify/combine. I need to actually view the page where you have this problem. If you’re comfortable with sharing the URL here, please do so. Otherwise, please fill the following form to share it privately: https://www.gabelivan.com/contact/

    Also, consider appending /?wpacu_no_load to the page where the JS file loads (I assume it’s the cart or checkout page). This would deactivate the loading of Asset CleanUp and the page will show as if it’s deactivated. Then, append /?wpacu_no_cache (or any query string that is unique and not common) and check the difference.

    Thread Starter Jackson Whelan

    (@madjax)

    Thanks @gabelivan – dropped a link in your contact form.

    I also tried your suggestion and the result is, when

    appending /?wpacu_no_load => no version number appended

    append /?wpacu_no_cache => version number appended

    Plugin Author Gabe Livan

    (@gabelivan)

    @madjax thanks for the update! I need to investigate that particular plugin as well and check how that JS file is actually loading. I’ll check the files you sent and do my best to come with a solution even if the page is not set to ignore Asset CleanUp from loading. I still find it odd that just by appending that query string to the URL it messes things up. It should work 100% anyway, perhaps there’s something else to it.

    To anyone reading this that has the same problem, Asset CleanUp can be deactivated on specific pages such as /checkout/ which are more sensitive to changes so to say. Please check this post explaining to you what needs to be done: https://assetcleanup.com/docs/how-to-exclude-the-plugin-from-loading-on-certain-pages/

    Thread Starter Jackson Whelan

    (@madjax)

    @gabelivan thanks for the replies.

    I believe it’s a security feature with Authorize.net to ensure that the right JS is loaded. SkyVerge said

    “the error that you are receiving is:

    Please include Accept.js library from cdn.

    This error can sometimes occur when there are optimization plugins the are removing query strings or altering the loading of the Authorize.net JavaScript calls on the Checkout page.”

    Plugin Author Gabe Livan

    (@gabelivan)

    @madjax Indeed, ?ver=5.5.1 (or whatever the value of $wp_version is) is appended to the asset’s URL by Asset CleanUp if it was set to null. I’ve released a patch that would fix this and you can get it from the development version of Asset CleanUp: https://assetcleanup.com/docs/how-to-get-the-development-version-of-asset-cleanup/ – this path will obviously be added to the next tag release, whenever this will happen, hopefully as soon as possible. Meanwhile, you should be fine with the development version ??

    As a thank you for raising this ticket which was proven to be an issue with the plugin: I can offer you a 40% discount for the Pro version if you will ever be interested in it or I can extend the current Pro license if you already have one ?? Just let me know if/whenever you will be interested.

    Thread Starter Jackson Whelan

    (@madjax)

    Thanks @gabelivan !

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin Appends Version to JS src Even When Disabled’ is closed to new replies.