How to use @woocommerce/settings - 10 common examples

To help you get started, we’ve selected a few @woocommerce/settings examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github woocommerce / woocommerce-gutenberg-products-block / assets / js / blocks / reviews / edit-utils.js View on Github external
/>
			{ attributes.showReviewRating && ! REVIEW_RATINGS_ENABLED && (
				
					
						{ sprintf(
							escapeHTML(
								/* translators: A notice that links to WooCommerce settings. */
								__(
									'Product rating is disabled in your %sstore settings%s.',
									'woo-gutenberg-products-block'
								)
							),
							`<a href="${ getAdminLink(
								'admin.php?page=wc-settings&amp;tab=products'
							) }">`,
							'</a>'
						) }
					
				
			) }
			
					setAttributes( {
						showReviewerName: ! attributes.showReviewerName,
					} )
				}
			/&gt;
github php4dev / heroku-wordpress / wp-content / plugins / woo-gutenberg-products-block / assets / js / atomic / blocks / product-elements / image / edit.js View on Github external
) }
					Customizer.',
								'woo-gutenberg-products-block'
							),
							{
								a: (
									// eslint-disable-next-line jsx-a11y/anchor-has-content
									<a rel="noopener noreferrer" href="{">
								),
							}
						) }
						value={ imageSizing }
						options={ [
							{
								label: __(
									'Full Size',
									'woo-gutenberg-products-block'
								),
								value: 'full-size',</a>
github php4dev / heroku-wordpress / wp-content / plugins / woocommerce / packages / woocommerce-blocks / assets / js / blocks / reviews / edit-utils.js View on Github external
/&gt;
					{ attributes.imageType === 'reviewer' &amp;&amp; ! SHOW_AVATARS &amp;&amp; (
						
							{ __experimentalCreateInterpolateElement(
								__(
									'Reviewer photo is disabled in your <a>site settings</a>.',
									'woocommerce'
								),
								{
									a: (
										// eslint-disable-next-line jsx-a11y/anchor-has-content
										<a rel="noopener noreferrer" href="{">
									),
								}
							) }
						</a><a rel="noopener noreferrer" href="{">
					) }
				
			) }
		
	);
};
</a>
github php4dev / heroku-wordpress / wp-content / plugins / woo-gutenberg-products-block / assets / js / blocks / reviews / edit-utils.js View on Github external
/&gt;
					{ attributes.imageType === 'reviewer' &amp;&amp; ! SHOW_AVATARS &amp;&amp; (
						
							{ __experimentalCreateInterpolateElement(
								__(
									'Reviewer photo is disabled in your <a>site settings</a>.',
									'woo-gutenberg-products-block'
								),
								{
									a: (
										// eslint-disable-next-line jsx-a11y/anchor-has-content
										<a rel="noopener noreferrer" href="{">
									),
								}
							) }
						</a><a rel="noopener noreferrer" href="{">
					) }
				
			) }
		
	);
};
</a>
github php4dev / heroku-wordpress / wp-content / plugins / woocommerce / packages / woocommerce-blocks / assets / js / blocks / reviews / edit-utils.js View on Github external
/&gt;
			{ attributes.showReviewRating &amp;&amp; ! REVIEW_RATINGS_ENABLED &amp;&amp; (
				
					{ __experimentalCreateInterpolateElement(
						__(
							'Product rating is disabled in your <a>store settings</a>.',
							'woocommerce'
						),
						{
							a: (
								// eslint-disable-next-line jsx-a11y/anchor-has-content
								<a rel="noopener noreferrer" href="{">
							),
						}
					) }
				</a><a rel="noopener noreferrer" href="{">
			) }
			
					setAttributes( {
						showReviewerName: ! attributes.showReviewerName,</a>
github php4dev / heroku-wordpress / wp-content / plugins / woo-gutenberg-products-block / assets / js / settings / blocks / constants.js View on Github external
);
export const DISPLAY_CART_PRICES_INCLUDING_TAX = getSetting(
	'displayCartPricesIncludingTax',
	false
);
export const PRODUCT_COUNT = getSetting( 'productCount', 0 );
export const ATTRIBUTES = getSetting( 'attributes', [] );
export const IS_SHIPPING_CALCULATOR_ENABLED = getSetting(
	'isShippingCalculatorEnabled',
	true
);
export const IS_SHIPPING_COST_HIDDEN = getSetting(
	'isShippingCostHidden',
	false
);
export const WOOCOMMERCE_BLOCKS_PHASE = getSetting(
	'woocommerceBlocksPhase',
	1
);
export const WC_BLOCKS_ASSET_URL = getSetting( 'wcBlocksAssetUrl', '' );
export const WC_BLOCKS_BUILD_URL = getSetting( 'wcBlocksBuildUrl', '' );
export const SHIPPING_COUNTRIES = getSetting( 'shippingCountries', {} );
export const ALLOWED_COUNTRIES = getSetting( 'allowedCountries', {} );
export const SHIPPING_STATES = getSetting( 'shippingStates', {} );
export const ALLOWED_STATES = getSetting( 'allowedStates', {} );
export const SHIPPING_METHODS_EXIST = getSetting(
	'shippingMethodsExist',
	false
);

export const PAYMENT_GATEWAY_SORT_ORDER = getSetting(
	'paymentGatewaySortOrder',
github php4dev / heroku-wordpress / wp-content / plugins / woo-gutenberg-products-block / assets / js / settings / blocks / constants.js View on Github external
/**
 * External dependencies
 */
import { getSetting } from '@woocommerce/settings';

export const CURRENT_USER_IS_ADMIN = getSetting( 'currentUserIsAdmin', false );
export const REVIEW_RATINGS_ENABLED = getSetting(
	'reviewRatingsEnabled',
	true
);
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 );
export const DEFAULT_ROWS = getSetting( 'default_rows', 3 );
export const MIN_HEIGHT = getSetting( 'min_height', 500 );
export const DEFAULT_HEIGHT = getSetting( 'default_height', 500 );
export const PLACEHOLDER_IMG_SRC = getSetting( 'placeholderImgSrc', '' );
export const THUMBNAIL_SIZE = getSetting( 'thumbnail_size', 300 );
export const IS_LARGE_CATALOG = getSetting( 'isLargeCatalog' );
export const LIMIT_TAGS = getSetting( 'limitTags' );
export const HAS_PRODUCTS = getSetting( 'hasProducts', true );
export const HAS_TAGS = getSetting( 'hasTags', true );
export const HOME_URL = getSetting( 'homeUrl', '' );
export const COUPONS_ENABLED = getSetting( 'couponsEnabled', true );
export const SHIPPING_ENABLED = getSetting( 'shippingEnabled', true );
export const TAXES_ENABLED = getSetting( 'taxesEnabled', true );
export const DISPLAY_ITEMIZED_TAXES = getSetting(
	'displayItemizedTaxes',
	false
github php4dev / heroku-wordpress / wp-content / plugins / woo-gutenberg-products-block / assets / js / settings / blocks / constants.js View on Github external
export const IS_SHIPPING_CALCULATOR_ENABLED = getSetting(
	'isShippingCalculatorEnabled',
	true
);
export const IS_SHIPPING_COST_HIDDEN = getSetting(
	'isShippingCostHidden',
	false
);
export const WOOCOMMERCE_BLOCKS_PHASE = getSetting(
	'woocommerceBlocksPhase',
	1
);
export const WC_BLOCKS_ASSET_URL = getSetting( 'wcBlocksAssetUrl', '' );
export const WC_BLOCKS_BUILD_URL = getSetting( 'wcBlocksBuildUrl', '' );
export const SHIPPING_COUNTRIES = getSetting( 'shippingCountries', {} );
export const ALLOWED_COUNTRIES = getSetting( 'allowedCountries', {} );
export const SHIPPING_STATES = getSetting( 'shippingStates', {} );
export const ALLOWED_STATES = getSetting( 'allowedStates', {} );
export const SHIPPING_METHODS_EXIST = getSetting(
	'shippingMethodsExist',
	false
);

export const PAYMENT_GATEWAY_SORT_ORDER = getSetting(
	'paymentGatewaySortOrder',
	[]
);

export const CHECKOUT_SHOW_LOGIN_REMINDER = getSetting(
	'checkoutShowLoginReminder',
	true
);
github php4dev / heroku-wordpress / wp-content / plugins / woo-gutenberg-products-block / assets / js / settings / blocks / constants.js View on Github external
/**
 * External dependencies
 */
import { getSetting } from '@woocommerce/settings';

export const CURRENT_USER_IS_ADMIN = getSetting( 'currentUserIsAdmin', false );
export const REVIEW_RATINGS_ENABLED = getSetting(
	'reviewRatingsEnabled',
	true
);
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 );
export const DEFAULT_ROWS = getSetting( 'default_rows', 3 );
export const MIN_HEIGHT = getSetting( 'min_height', 500 );
export const DEFAULT_HEIGHT = getSetting( 'default_height', 500 );
export const PLACEHOLDER_IMG_SRC = getSetting( 'placeholderImgSrc', '' );
export const THUMBNAIL_SIZE = getSetting( 'thumbnail_size', 300 );
export const IS_LARGE_CATALOG = getSetting( 'isLargeCatalog' );
export const LIMIT_TAGS = getSetting( 'limitTags' );
export const HAS_PRODUCTS = getSetting( 'hasProducts', true );
export const HAS_TAGS = getSetting( 'hasTags', true );
export const HOME_URL = getSetting( 'homeUrl', '' );
export const COUPONS_ENABLED = getSetting( 'couponsEnabled', true );
github woocommerce / woocommerce-gutenberg-products-block / assets / js / settings / blocks / constants.js View on Github external
export const MAX_ROWS = getSetting( 'max_rows', 6 );
export const MIN_ROWS = getSetting( 'min_rows', 1 );
export const DEFAULT_ROWS = getSetting( 'default_rows', 2 );
export const MIN_HEIGHT = getSetting( 'min_height', 500 );
export const DEFAULT_HEIGHT = getSetting( 'default_height', 500 );
export const PLACEHOLDER_IMG_SRC = getSetting( 'placeholderImgSrc', '' );
export const THUMBNAIL_SIZE = getSetting( 'thumbnail_size', 300 );
export const IS_LARGE_CATALOG = getSetting( 'isLargeCatalog' );
export const LIMIT_TAGS = getSetting( 'limitTags' );
export const HAS_PRODUCTS = getSetting( 'hasProducts', true );
export const HAS_TAGS = getSetting( 'hasTags', true );
export const HOME_URL = getSetting( 'homeUrl', '' );
export const SHOP_URL = getSetting( 'shopUrl', '' );
export const CHECKOUT_URL = getSetting( 'checkoutUrl', '' );
export const PRODUCT_COUNT = getSetting( 'productCount', 0 );
export const ATTRIBUTES = getSetting( 'attributes', [] );
export const WC_BLOCKS_ASSET_URL = getSetting( 'wcBlocksAssetUrl', '' );