mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Check single product and mini card setting for displaying PayPal buttons
This commit is contained in:
parent
2efb300be8
commit
ab6f8a3c99
2 changed files with 24 additions and 20 deletions
|
@ -18,15 +18,17 @@ const bootstrap = () => {
|
|||
const messageRenderer = new MessageRenderer(PayPalCommerceGateway.messages);
|
||||
const context = PayPalCommerceGateway.context;
|
||||
if (context === 'mini-cart' || context === 'product') {
|
||||
const miniCartBootstrap = new MiniCartBootstap(
|
||||
PayPalCommerceGateway,
|
||||
renderer
|
||||
);
|
||||
if (PayPalCommerceGateway.mini_card_buttons_enabled === '1') {
|
||||
const miniCartBootstrap = new MiniCartBootstap(
|
||||
PayPalCommerceGateway,
|
||||
renderer
|
||||
);
|
||||
|
||||
miniCartBootstrap.init();
|
||||
miniCartBootstrap.init();
|
||||
}
|
||||
}
|
||||
|
||||
if (context === 'product') {
|
||||
if (context === 'product' && PayPalCommerceGateway.single_product_buttons_enabled === '1') {
|
||||
const singleProductBootstrap = new SingleProductBootstap(
|
||||
PayPalCommerceGateway,
|
||||
renderer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue