( state, ownProps ) => {
		const method = getCurrentlyOpenShippingZoneMethod( state );

		return {
			method,
			isVisible: Boolean( method ),
			isNew: method && isCurrentlyOpenShippingZoneMethodNew( state ),
			methodNamesMap: getShippingMethodNameMap( state ),
			methodTypeOptions: method && getMethodTypeChangeOptions( state, method.methodType ),
			currency: getCurrencyWithEdits( state ),
			wcsEnabled: isWcsEnabled( state, ownProps.siteId ),
			canSave:
				( method && ! startsWith( method.methodType, 'wc_services' ) ) ||
				isEmpty( getFormErrors( state ) ),
		};
	},
示例#2
0
		( state, { siteId } ) => {
			const isSavingApiKey = isSubmittingApiKey( state, siteId );
			const isSavingStoreInfo = isSubmittingStoreInfo( state, siteId );
			const isSavingNewsletterSettings = isSubmittingNewsletterSetting( state, siteId );
			const isKeyCorrect = isApiKeyCorrect( state, siteId );
			const address = getStoreLocation( state );
			const currency = getCurrencyWithEdits( state );
			const isBusy = isSavingApiKey || isSavingStoreInfo || isSavingNewsletterSettings;
			return {
				isBusy,
				address,
				currency,
				isKeyCorrect,
				siteTitle: getSiteTitle( state, siteId ),
				currentUserEmail: getCurrentUserEmail( state ),
				timezone: getSiteTimezoneValue( state, siteId ),
			};
		},