mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #1536 from woocommerce/PCP-1871-one-page-checkout-causes-mini-cart-not-showing-the-pp-button-on-certain-pages
One-page checkout causes mini cart not showing the PP button on certain pages (1871)
This commit is contained in:
commit
02de8ada7f
2 changed files with 40 additions and 9 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue