mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
🔀 Merge branch ‘trunk'
This commit is contained in:
commit
c4a1217e6a
4 changed files with 33 additions and 31 deletions
|
@ -56,7 +56,7 @@ class CardFieldsRenderer {
|
|||
onApprove( data ) {
|
||||
return contextConfig.onApprove( data );
|
||||
},
|
||||
onError( error ) {
|
||||
onError: ( error ) => {
|
||||
console.error( error );
|
||||
this.spinner.unblock();
|
||||
},
|
||||
|
@ -106,10 +106,12 @@ class CardFieldsRenderer {
|
|||
|
||||
cardFields.submit().catch( ( error ) => {
|
||||
this.spinner.unblock();
|
||||
if (!error.type || error.type !== 'create-order-error') {
|
||||
console.error( error );
|
||||
this.errorHandler.message(
|
||||
this.defaultConfig.hosted_fields.labels.fields_not_valid
|
||||
);
|
||||
}
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -32,7 +32,10 @@ const FeatureItem = ( {
|
|||
);
|
||||
const handleClick = async ( feature ) => {
|
||||
if ( feature.action?.type === 'tab' ) {
|
||||
const highlight = Boolean( feature.action?.highlight );
|
||||
const highlight =
|
||||
feature.action?.highlight === undefined
|
||||
? true
|
||||
: Boolean( feature.action.highlight );
|
||||
const tabId = TAB_IDS[ feature.action.tab.toUpperCase() ];
|
||||
await selectTab( tabId, feature.action.section, highlight );
|
||||
}
|
||||
|
|
|
@ -153,7 +153,6 @@ class FeaturesDefinition {
|
|||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-credit-card-gateway',
|
||||
'highlight' => 'ppcp-credit-card-gateway',
|
||||
'modal' => 'ppcp-credit-card-gateway',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
|
@ -189,7 +188,7 @@ class FeaturesDefinition {
|
|||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-alternative-payments-card',
|
||||
'highlight' => 'ppcp-alternative-payments-card',
|
||||
'highlight' => false,
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
'class' => 'small-button',
|
||||
|
@ -221,7 +220,6 @@ class FeaturesDefinition {
|
|||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-googlepay',
|
||||
'highlight' => 'ppcp-googlepay',
|
||||
'modal' => 'ppcp-googlepay',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
|
@ -259,8 +257,7 @@ class FeaturesDefinition {
|
|||
'action' => array(
|
||||
'type' => 'tab',
|
||||
'tab' => 'payment_methods',
|
||||
'section' => 'ppcp-card-payments-card',
|
||||
'highlight' => 'ppcp-applepay',
|
||||
'section' => 'ppcp-applepay',
|
||||
'modal' => 'ppcp-applepay',
|
||||
),
|
||||
'showWhen' => 'enabled',
|
||||
|
|
|
@ -32,7 +32,7 @@ return array(
|
|||
'prefix' => 'WooCommerce\\PayPalCommerce\\Vendor',
|
||||
'finders' => $finders,
|
||||
'patchers' => array(),
|
||||
'exclude-files' => array(), // list<string>.
|
||||
'exclude-files' => array( 'vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php' ), // list<string>.
|
||||
'exclude-namespaces' => array(
|
||||
'/^(?!Psr).*/', // Exclude all namespaces except those starting with "Psr".
|
||||
), // list<string|regex>.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue