mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add minicart button
This commit is contained in:
parent
6949064cdb
commit
0a7bd32f80
4 changed files with 47 additions and 33 deletions
|
@ -23,10 +23,11 @@ import ApplepayManager from "./ApplepayManager";
|
|||
console.error('PayPal button could not be configured.');
|
||||
return;
|
||||
}
|
||||
console.log(buttonConfig.button.wrapper)
|
||||
console.log(jQuery(buttonConfig.button.wrapper).length)
|
||||
const isMiniCart = ppcpConfig.mini_cart_buttons_enabled;
|
||||
const isButton = jQuery(buttonConfig.button.cart_wrapper).length > 0;
|
||||
// If button wrapper is not present then there is no need to load the scripts.
|
||||
if (!jQuery(buttonConfig.button.wrapper).length) {
|
||||
// minicart loads later?
|
||||
if (!isMiniCart && !isButton) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue