Support » Plugin: Afterpay Gateway for WooCommerce » Afterpay not showing on mobile

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Afterpay

    (@afterpayit)

    Hi @bathroo,

    Thank you for your message. It appears that the Afterpay client side script file has been concatenated with the other site scripts using the SiteGrounds Optimizer plugin. This is known to cause errors with the Afterpay plugin. Two options are outlined below for resolving this challenge.

    1. Turn off javascript file concatenation.
    To achieve this, go to the Frontend settings of the SiteGrounds Optimizer plugin. Click the Javascript tab and turn off Combine Javascript Files.

    2. Use the SiteGrounds Optimizer hook to disable Afterpay Javascript concatenation.
    This option allows for more control over the scripts as it only disables concatenation of the Afterpay files. The engineering team recommends engaging the websites development team as it requires editing files. Adding the following code will achieve this.

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

    Thank you.

    Thread Starter bathroo

    (@bathroo)

    Thanks Afterpay team. it works. Afterpay is great to have on the website.

    Suggest others in the Woocommeerce community use the fix.

    Thread Starter bathroo

    (@bathroo)

    Also worth noting it doesn’t really impact load time either.

    It would be great to integrate it into Sitegrounds optimisation thou 🙂

    Plugin Author Afterpay

    (@afterpayit)

    Hi @bathroo,

    Thank you very much for confirming that the suggested resolution works. Compatibility with 3rd party plugins is something that the engineering team is continually striving to improve.

    As this has been resolved, we will mark this thread as such.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.