mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-04-26 01:14:19 +08:00
- Add type ShopConfig for method utils.configureStore - Update param names according to boolean type - Update param names across codebase
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
/**
|
|
* Internal dependencies
|
|
*/
|
|
import { shopSettings, ShopConfig } from '.';
|
|
|
|
const country = process.env.WC_DEFAULT_COUNTRY || 'usa';
|
|
|
|
export const storeConfigDefault: ShopConfig = {
|
|
enableClassicPages: false, // false = block cart and checkout (default), true = classic cart & checkout pages
|
|
enableWpDebugging: false, // WP Debugging plugin is deactivated
|
|
enableSubscriptionsPlugin: false, // WC Subscription plugin is deactivated
|
|
settings: shopSettings[ country ], // WC general settings
|
|
};
|
|
|
|
export const storeConfigClassic: ShopConfig = {
|
|
...storeConfigDefault,
|
|
enableClassicPages: true,
|
|
};
|
|
|
|
export const storeConfigGermany: ShopConfig = {
|
|
...storeConfigDefault,
|
|
settings: shopSettings.germany, // WC general settings
|
|
};
|
|
|
|
export const storeConfigUsa: ShopConfig = {
|
|
...storeConfigDefault,
|
|
enableWpDebugging: true,
|
|
settings: shopSettings.usa,
|
|
};
|
|
|
|
export const storeConfigMexico: ShopConfig = {
|
|
...storeConfigDefault,
|
|
settings: shopSettings.mexico,
|
|
};
|
|
|
|
const storeConfigSubscription: ShopConfig = {
|
|
enableSubscriptionsPlugin: true,
|
|
};
|
|
|
|
export const storeConfigSubscriptionGermany: ShopConfig = {
|
|
...storeConfigGermany,
|
|
...storeConfigSubscription,
|
|
};
|
|
|
|
export const storeConfigSubscriptionUsa: ShopConfig = {
|
|
...storeConfigUsa,
|
|
...storeConfigSubscription,
|
|
};
|