• Resolved johnc1979

    (@johnc1979)


    Hi,

    The Latitude pay plugin is adding links to css files for every gateway in use on the site. For example, if afterpay and Paypal are in use it will add a link to a css file located at /latitude-pay-genoa-pay-integrations/assets/css/afterpay/style.css and /latitude-pay-genoa-pay-integrations/assets/css/paypal/style.css
    These files are being called on product pages, cart and checkout pages.
    These files don’t exist so cause the page to become very slow and unresponsive. I’ve applied a dirty fix by adding the folder and file, but with up to 40 sites to have to apply this fix to manually it’s quite the task

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous User 17923694

    (@anonymized-17923694)

    Hey John,

    Thanks for reporting this issue. can you please email [email protected] with your website URL for us to look into the issue and work out a patch for this asap?

    Thanks.

    @chandansharma FYI I reported to you via email the same thing that @johnc1979 refers to on 25th June. Subject Re: [EXTERNAL] Re: LatitudePay Setup

    I supplied apache logs and suggested the plugin is prepending a path of its own to those assets.

    Thread Starter johnc1979

    (@johnc1979)

    @chandansharma As a starting point I’d be looking in /includes/wc-latitudefinance-functions.php

    I will see if I am authorised to provide the credentials to any of the affected sites I manage

    • This reply was modified 4 years, 3 months ago by johnc1979.
    Thread Starter johnc1979

    (@johnc1979)

    @chandansharma your problem is in here. You’re calling every gateway id and creating links to files that don’t exist instead of only one for this plugin.

    function wc_latitudefinance_include_extra_scripts()
    {
        foreach (WC()->payment_gateways()->get_available_payment_gateways() as $id => $gateway) {
            if ($id) {
                $file = WC_LATITUDEPAY_ASSETS . '/css/' . $id . '/styles.css';
                // enqueue the files only if it meets the following condition
                // 1. is product page
                // 2. OR is checkout page
                if (is_product() || is_checkout() || is_cart()) {
                    wp_register_style('woocommerce-payment-gateway-latitudefinance-' . $id, $file);
                    wp_enqueue_style('woocommerce-payment-gateway-latitudefinance-' . $id);
                }
    
                /**
                 * is cart page
                 */
                if (is_cart()) {
                    wp_register_style('woocommerce-payment-gateway-latitudefinance-cart', WC_LATITUDEPAY_ASSETS . '/css/common.css');
                    wp_enqueue_style('woocommerce-payment-gateway-latitudefinance-cart');
                }
            }
        }
    }
    Anonymous User 17923694

    (@anonymized-17923694)

    Hi @johnc1979 & @embercide,
    Appreciate your feedback. We are currently looking into this issue however it would be really helpful if you could utilise this email id [email protected] to send your details if you haven’t already so that we can gather more details.
    Cheers,

    Thread Starter johnc1979

    (@johnc1979)

    @chandansharma email sent

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin creating links to a css file for every gateway in use and causing 404 on’ is closed to new replies.