mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Render the PP buttons in the wrapper using the default config
This commit is contained in:
parent
bb7dea7066
commit
007a32b59c
1 changed files with 9 additions and 1 deletions
|
@ -2,7 +2,7 @@ import Renderer from './modules/Renderer';
|
||||||
import SingleProductConfig from './modules/SingleProductConfig';
|
import SingleProductConfig from './modules/SingleProductConfig';
|
||||||
import UpdateCart from './modules/UpdateCart';
|
import UpdateCart from './modules/UpdateCart';
|
||||||
import ErrorHandler from './modules/ErrorHandler';
|
import ErrorHandler from './modules/ErrorHandler';
|
||||||
import CartConfig from "./modules/CartConfig";
|
import CartConfig from './modules/CartConfig';
|
||||||
|
|
||||||
const bootstrap = ()=> {
|
const bootstrap = ()=> {
|
||||||
const context = PayPalCommerceGateway.context;
|
const context = PayPalCommerceGateway.context;
|
||||||
|
@ -29,6 +29,14 @@ const bootstrap = ()=> {
|
||||||
renderer.render(defaultConfigurator.configuration())
|
renderer.render(defaultConfigurator.configuration())
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// Configure checkout buttons
|
||||||
|
jQuery( document.body ).on( 'updated_checkout', () => {
|
||||||
|
const renderer = new Renderer(
|
||||||
|
PayPalCommerceGateway.button.order_button_wrapper
|
||||||
|
);
|
||||||
|
renderer.render(defaultConfigurator.configuration());
|
||||||
|
} );
|
||||||
|
|
||||||
// Configure context buttons
|
// Configure context buttons
|
||||||
if (! document.querySelector(PayPalCommerceGateway.button.wrapper)) {
|
if (! document.querySelector(PayPalCommerceGateway.button.wrapper)) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue