2019-11-08 16:30:11 +00:00
|
|
|
/**
|
2020-03-17 11:45:33 +00:00
|
|
|
* Internal dependencies
|
2019-11-08 16:30:11 +00:00
|
|
|
*/
|
2020-03-17 11:45:33 +00:00
|
|
|
import { getSetting } from '../shared';
|
2019-09-23 18:07:13 +00:00
|
|
|
|
2020-03-06 11:43:40 +00:00
|
|
|
export const CURRENT_USER_IS_ADMIN = getSetting( 'currentUserIsAdmin', false );
|
2019-12-13 17:13:11 +00:00
|
|
|
export const REVIEW_RATINGS_ENABLED = getSetting(
|
|
|
|
'reviewRatingsEnabled',
|
|
|
|
true
|
|
|
|
);
|
2019-09-23 18:07:13 +00:00
|
|
|
export const SHOW_AVATARS = getSetting( 'showAvatars', true );
|
|
|
|
export const MAX_COLUMNS = getSetting( 'max_columns', 6 );
|
|
|
|
export const MIN_COLUMNS = getSetting( 'min_columns', 1 );
|
|
|
|
export const DEFAULT_COLUMNS = getSetting( 'default_columns', 3 );
|
|
|
|
export const MAX_ROWS = getSetting( 'max_rows', 6 );
|
|
|
|
export const MIN_ROWS = getSetting( 'min_rows', 1 );
|
2020-01-22 16:58:25 +00:00
|
|
|
export const DEFAULT_ROWS = getSetting( 'default_rows', 3 );
|
2019-09-23 18:07:13 +00:00
|
|
|
export const MIN_HEIGHT = getSetting( 'min_height', 500 );
|
|
|
|
export const DEFAULT_HEIGHT = getSetting( 'default_height', 500 );
|
2019-10-24 13:55:44 +00:00
|
|
|
export const PLACEHOLDER_IMG_SRC = getSetting( 'placeholderImgSrc', '' );
|
2019-09-23 18:07:13 +00:00
|
|
|
export const THUMBNAIL_SIZE = getSetting( 'thumbnail_size', 300 );
|
|
|
|
export const IS_LARGE_CATALOG = getSetting( 'isLargeCatalog' );
|
|
|
|
export const LIMIT_TAGS = getSetting( 'limitTags' );
|
2019-10-28 13:53:09 +00:00
|
|
|
export const HAS_PRODUCTS = getSetting( 'hasProducts', true );
|
2019-09-23 18:07:13 +00:00
|
|
|
export const HAS_TAGS = getSetting( 'hasTags', true );
|
2019-10-23 10:51:10 +00:00
|
|
|
export const HOME_URL = getSetting( 'homeUrl', '' );
|
2020-01-10 14:37:27 +00:00
|
|
|
export const COUPONS_ENABLED = getSetting( 'couponsEnabled', true );
|
2020-02-19 16:33:10 +00:00
|
|
|
export const SHIPPING_ENABLED = getSetting( 'shippingEnabled', true );
|
2020-03-03 10:12:18 +00:00
|
|
|
export const DISPLAY_SHOP_PRICES_INCLUDING_TAX = getSetting(
|
|
|
|
'displayShopPricesIncludingTax',
|
|
|
|
false
|
|
|
|
);
|
|
|
|
export const DISPLAY_CART_PRICES_INCLUDING_TAX = getSetting(
|
|
|
|
'displayCartPricesIncludingTax',
|
2020-01-10 14:37:27 +00:00
|
|
|
false
|
|
|
|
);
|
2019-11-01 13:56:14 +00:00
|
|
|
export const PRODUCT_COUNT = getSetting( 'productCount', 0 );
|
2019-11-11 10:32:56 +00:00
|
|
|
export const ATTRIBUTES = getSetting( 'attributes', [] );
|
2020-02-19 16:33:10 +00:00
|
|
|
export const IS_SHIPPING_CALCULATOR_ENABLED = getSetting(
|
|
|
|
'isShippingCalculatorEnabled',
|
|
|
|
true
|
|
|
|
);
|
|
|
|
export const IS_SHIPPING_COST_HIDDEN = getSetting(
|
|
|
|
'isShippingCostHidden',
|
|
|
|
false
|
|
|
|
);
|
2019-11-15 14:15:55 +00:00
|
|
|
export const WC_BLOCKS_ASSET_URL = getSetting( 'wcBlocksAssetUrl', '' );
|
2020-01-17 16:58:08 +00:00
|
|
|
export const SHIPPING_COUNTRIES = getSetting( 'shippingCountries', {} );
|
|
|
|
export const ALLOWED_COUNTRIES = getSetting( 'allowedCountries', {} );
|
2020-02-19 17:14:41 +00:00
|
|
|
export const SHIPPING_STATES = getSetting( 'shippingStates', {} );
|
|
|
|
export const ALLOWED_STATES = getSetting( 'allowedStates', {} );
|
2020-02-26 15:50:53 +00:00
|
|
|
export const SHIPPING_METHODS_EXIST = getSetting(
|
|
|
|
'shippingMethodsExist',
|
|
|
|
false
|
|
|
|
);
|
2020-03-06 12:20:17 +00:00
|
|
|
|
|
|
|
const defaultPage = {
|
2020-03-16 16:38:24 +00:00
|
|
|
id: 0,
|
|
|
|
title: '',
|
|
|
|
permalink: '',
|
2020-03-06 12:20:17 +00:00
|
|
|
};
|
|
|
|
const storePages = getSetting( 'storePages', {
|
|
|
|
shop: defaultPage,
|
2020-03-16 16:38:24 +00:00
|
|
|
cart: defaultPage,
|
2020-03-06 12:20:17 +00:00
|
|
|
checkout: defaultPage,
|
|
|
|
privacy: defaultPage,
|
|
|
|
terms: defaultPage,
|
|
|
|
} );
|
2020-03-16 16:38:24 +00:00
|
|
|
export const SHOP_URL = storePages.shop.permalink;
|
|
|
|
|
|
|
|
export const CHECKOUT_PAGE_ID = storePages.checkout.id;
|
|
|
|
export const CHECKOUT_URL = storePages.checkout.permalink;
|
|
|
|
|
|
|
|
export const PRIVACY_URL = storePages.privacy.permalink;
|
|
|
|
export const PRIVACY_PAGE_NAME = storePages.privacy.title;
|
|
|
|
|
|
|
|
export const TERMS_URL = storePages.terms.permalink;
|
|
|
|
export const TERMS_PAGE_NAME = storePages.terms.title;
|
|
|
|
|
|
|
|
export const CART_PAGE_ID = storePages.cart.id;
|
|
|
|
export const CART_URL = storePages.cart.permalink;
|