Add sanitize woocommerce_widget_cart_is_hidden filter for consistent values.

Remove context restrictions to mini-cart paypal buttons.
This commit is contained in:
Pedro Silva 2023-07-24 17:09:45 +01:00
parent 0672ca4950
commit 59a68fb604
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 32 additions and 9 deletions

View file

@ -137,16 +137,15 @@ const bootstrap = () => {
};
const renderer = new Renderer(creditCardRenderer, PayPalCommerceGateway, onSmartButtonClick, onSmartButtonsInit);
const messageRenderer = new MessageRenderer(PayPalCommerceGateway.messages);
if (context === 'mini-cart' || context === 'product') {
if (PayPalCommerceGateway.mini_cart_buttons_enabled === '1') {
const miniCartBootstrap = new MiniCartBootstap(
PayPalCommerceGateway,
renderer,
errorHandler,
);
miniCartBootstrap.init();
}
if (PayPalCommerceGateway.mini_cart_buttons_enabled === '1') {
const miniCartBootstrap = new MiniCartBootstap(
PayPalCommerceGateway,
renderer,
errorHandler,
);
miniCartBootstrap.init();
}
if (context === 'product' && PayPalCommerceGateway.single_product_buttons_enabled === '1') {