mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Override hosted fields configurtation when PayPal subscriptions is enabled
This commit is contained in:
parent
69542e37f3
commit
69da3f78ed
2 changed files with 4 additions and 4 deletions
|
@ -68,11 +68,11 @@ class CheckoutBootstap {
|
|||
PayPalCommerceGateway.data_client_id.has_subscriptions
|
||||
&& PayPalCommerceGateway.data_client_id.paypal_subscriptions_enabled
|
||||
) {
|
||||
this.renderer.render(actionHandler.subscriptionsConfiguration());
|
||||
this.renderer.render(actionHandler.subscriptionsConfiguration(), {}, actionHandler.configuration());
|
||||
return;
|
||||
}
|
||||
|
||||
this.renderer.render(actionHandler.configuration());
|
||||
this.renderer.render(actionHandler.configuration(), {}, actionHandler.configuration());
|
||||
}
|
||||
|
||||
updateUi() {
|
||||
|
|
|
@ -10,7 +10,7 @@ class Renderer {
|
|||
this.renderedSources = new Set();
|
||||
}
|
||||
|
||||
render(contextConfig, settingsOverride = {}) {
|
||||
render(contextConfig, settingsOverride = {}, contextConfigOverride = () => {}) {
|
||||
const settings = merge(this.defaultSettings, settingsOverride);
|
||||
|
||||
const enabledSeparateGateways = Object.fromEntries(Object.entries(
|
||||
|
@ -50,7 +50,7 @@ class Renderer {
|
|||
}
|
||||
|
||||
if (this.creditCardRenderer) {
|
||||
this.creditCardRenderer.render(settings.hosted_fields.wrapper, contextConfig);
|
||||
this.creditCardRenderer.render(settings.hosted_fields.wrapper, contextConfigOverride);
|
||||
}
|
||||
|
||||
for (const [fundingSource, data] of Object.entries(enabledSeparateGateways)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue