mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
54 lines
1.5 KiB
JavaScript
54 lines
1.5 KiB
JavaScript
import { addDebugTools } from './debug';
|
|
import * as Onboarding from './onboarding';
|
|
import * as Common from './common';
|
|
import * as Payment from './payment';
|
|
import * as Settings from './settings';
|
|
import * as Styling from './styling';
|
|
import * as Todos from './todos';
|
|
import * as PayLaterMessaging from './pay-later-messaging';
|
|
|
|
const stores = [
|
|
Onboarding,
|
|
Common,
|
|
Payment,
|
|
Settings,
|
|
Styling,
|
|
Todos,
|
|
PayLaterMessaging,
|
|
];
|
|
|
|
stores.forEach( ( store ) => {
|
|
try {
|
|
if ( false === store.initStore() ) {
|
|
console.error(
|
|
`Store initialization failed for ${ store.STORE_NAME }`
|
|
);
|
|
}
|
|
} catch ( e ) {
|
|
console.error(
|
|
'Error during store initialization:',
|
|
store.STORE_NAME,
|
|
e
|
|
);
|
|
}
|
|
} );
|
|
|
|
export const OnboardingHooks = Onboarding.hooks;
|
|
export const CommonHooks = Common.hooks;
|
|
export const PaymentHooks = Payment.hooks;
|
|
export const SettingsHooks = Settings.hooks;
|
|
export const StylingHooks = Styling.hooks;
|
|
export const TodosHooks = Todos.hooks;
|
|
export const PayLaterMessagingHooks = PayLaterMessaging.hooks;
|
|
|
|
export const OnboardingStoreName = Onboarding.STORE_NAME;
|
|
export const CommonStoreName = Common.STORE_NAME;
|
|
export const PaymentStoreName = Payment.STORE_NAME;
|
|
export const SettingsStoreName = Settings.STORE_NAME;
|
|
export const StylingStoreName = Styling.STORE_NAME;
|
|
export const TodosStoreName = Todos.STORE_NAME;
|
|
export const PayLaterMessagingStoreName = PayLaterMessaging.STORE_NAME;
|
|
|
|
export * from './configuration';
|
|
|
|
addDebugTools( window.ppcpSettings, stores );
|