mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
🎨 Eslint auto-fixes
This commit is contained in:
parent
71c19d8034
commit
cd5622260d
1 changed files with 11 additions and 6 deletions
|
@ -160,7 +160,7 @@ class Renderer {
|
||||||
// Check the condition and add the handler if needed
|
// Check the condition and add the handler if needed
|
||||||
if ( this.shouldEnableShippingCallback() ) {
|
if ( this.shouldEnableShippingCallback() ) {
|
||||||
options.onShippingOptionsChange = ( data, actions ) => {
|
options.onShippingOptionsChange = ( data, actions ) => {
|
||||||
let shippingOptionsChange =
|
const shippingOptionsChange =
|
||||||
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
|
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
|
||||||
venmoButtonClicked
|
venmoButtonClicked
|
||||||
)
|
)
|
||||||
|
@ -171,10 +171,10 @@ class Renderer {
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return shippingOptionsChange
|
return shippingOptionsChange;
|
||||||
};
|
};
|
||||||
options.onShippingAddressChange = ( data, actions ) => {
|
options.onShippingAddressChange = ( data, actions ) => {
|
||||||
let shippingAddressChange =
|
const shippingAddressChange =
|
||||||
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
|
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
|
||||||
venmoButtonClicked
|
venmoButtonClicked
|
||||||
)
|
)
|
||||||
|
@ -185,7 +185,7 @@ class Renderer {
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return shippingAddressChange
|
return shippingAddressChange;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,8 +247,13 @@ class Renderer {
|
||||||
};
|
};
|
||||||
|
|
||||||
shouldEnableShippingCallback = () => {
|
shouldEnableShippingCallback = () => {
|
||||||
let needShipping = this.defaultSettings.needShipping || this.defaultSettings.context === 'product'
|
const needShipping =
|
||||||
return this.defaultSettings.should_handle_shipping_in_paypal && needShipping
|
this.defaultSettings.needShipping ||
|
||||||
|
this.defaultSettings.context === 'product';
|
||||||
|
return (
|
||||||
|
this.defaultSettings.should_handle_shipping_in_paypal &&
|
||||||
|
needShipping
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
isAlreadyRendered( wrapper, fundingSource ) {
|
isAlreadyRendered( wrapper, fundingSource ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue