Add minicart button

This commit is contained in:
carmenmaymo 2023-09-10 13:21:19 +02:00
parent 6949064cdb
commit 0a7bd32f80
No known key found for this signature in database
GPG key ID: 6023F686B0F3102E
4 changed files with 47 additions and 33 deletions

View file

@ -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;
}