Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

dropin.min.js loaded on each page

$
0
0

Replies: 0

While looking at page speed, noticed the dropin.min.js (150KB) gets loaded on every page. I use payment options only on cart and checkout pages. No single-product buttons at all. Is it there a proper way to adjust what gets loaded from the PP/BT plugin to concern only those pages? Thanks!

EDIT: Looking at the code, it seems something related to fraud protection?

I’m getting this in my page source:

<script src='https://js.braintreegateway.com/web/dropin/1.10.0/js/dropin.min.js' data-log-level='error'>

and it seems related to this piece of code:

plugins\paypal-for-woocommerce\classes\wc-gateway-braintree-angelleye.php line 2184:

public function adjust_fraud_script_tag($url) {
    if (strpos($url, 'https://js.braintreegateway.com/web/dropin/1.10.0/js/dropin.min.js') !== false) {
        return "$url' data-log-level='error";
    }
    return $url;
}

Why the data-log-level='error'?


Viewing all articles
Browse latest Browse all 59525

Trending Articles