mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
🐛 Fix button specific config-preparation
This commit is contained in:
parent
da64ffbac5
commit
33c6c06e85
4 changed files with 51 additions and 8 deletions
|
@ -97,8 +97,18 @@ class GooglePayPreviewButton extends PreviewButton {
|
|||
);
|
||||
|
||||
button.init(this.configResponse);
|
||||
}
|
||||
|
||||
return button;
|
||||
/**
|
||||
* Some style details need to be copied from the ppcpConfig object to buttonConfig.
|
||||
*
|
||||
* - ppcpConfig: Generated by JS, containing the current form values.
|
||||
* - buttonConfig: Generated on server side, contains the full (saved) button details.
|
||||
*/
|
||||
applyPreviewConfig() {
|
||||
if (this.ppcpConfig && this.buttonConfig) {
|
||||
this.buttonConfig.button.style = this.ppcpConfig.button.style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue