mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Update /utils/utils.ts
- Remove irrelevant functionality - Relevant updates in spec file
This commit is contained in:
parent
8334352104
commit
965744ef9f
2 changed files with 4 additions and 15 deletions
|
@ -24,7 +24,7 @@ import {
|
|||
subscriptionsPlugin,
|
||||
wpDebuggingPlugin,
|
||||
pcpPlugin,
|
||||
PcpMerchant,
|
||||
Pcp,
|
||||
} from '../resources';
|
||||
import { getCustomerStorageStateName } from './helpers';
|
||||
|
||||
|
@ -151,12 +151,7 @@ export class Utils {
|
|||
);
|
||||
};
|
||||
|
||||
connectMerchant = async (
|
||||
merchant: PcpMerchant,
|
||||
options = {
|
||||
enablePayUponInvoice: false,
|
||||
}
|
||||
) => {};
|
||||
connectMerchant = async ( merchant: Pcp.Merchant ) => {};
|
||||
|
||||
disconnectMerchant = async () => {};
|
||||
|
||||
|
@ -242,7 +237,7 @@ export class Utils {
|
|||
}
|
||||
};
|
||||
|
||||
configurePcp = async ( data ) => {
|
||||
configurePcp = async ( data: Pcp.Admin.Config ) => {
|
||||
if (
|
||||
! ( await this.requestUtils.isPluginInstalled( pcpPlugin.slug ) )
|
||||
) {
|
||||
|
@ -251,17 +246,12 @@ export class Utils {
|
|||
await this.requestUtils.activatePlugin( pcpPlugin.slug );
|
||||
|
||||
if ( data.merchant ) {
|
||||
if ( data.clearPCPDB ) {
|
||||
}
|
||||
|
||||
if ( data.disconnectMerchant ) {
|
||||
await this.disconnectMerchant();
|
||||
return;
|
||||
}
|
||||
|
||||
await this.connectMerchant( data.merchant, {
|
||||
enablePayUponInvoice: data.enablePayUponInvoice || false,
|
||||
} );
|
||||
await this.connectMerchant( data.merchant );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue