diff --git a/packages/js/components/changelog/update-replace-dependency-on-jetpack-in-woo-services-task-list b/packages/js/components/changelog/update-replace-dependency-on-jetpack-in-woo-services-task-list new file mode 100644 index 00000000000..22d29f1e940 --- /dev/null +++ b/packages/js/components/changelog/update-replace-dependency-on-jetpack-in-woo-services-task-list @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Remove dependency on Jetpack from WooCommerce Shipping & Tax onboarding tasks \ No newline at end of file diff --git a/packages/js/components/src/plugins/index.tsx b/packages/js/components/src/plugins/index.tsx index 972874c664a..fc3971f0346 100644 --- a/packages/js/components/src/plugins/index.tsx +++ b/packages/js/components/src/plugins/index.tsx @@ -37,7 +37,7 @@ export const Plugins = ( { onAbort, onComplete, onError = () => null, - pluginSlugs = [ 'jetpack', 'woocommerce-services' ], + pluginSlugs = [ 'woocommerce-services' ], onSkip, installText = __( 'Install & enable', 'woocommerce' ), skipText = __( 'No thanks', 'woocommerce' ), diff --git a/packages/js/data/changelog/add-export-wcuser-type b/packages/js/data/changelog/add-export-wcuser-type new file mode 100644 index 00000000000..dd3bb40f053 --- /dev/null +++ b/packages/js/data/changelog/add-export-wcuser-type @@ -0,0 +1,4 @@ +Significance: patch +Type: add + +Export WCUser type for consumption in wcadmin diff --git a/packages/js/data/src/index.ts b/packages/js/data/src/index.ts index 146edd1b757..b259f90503d 100644 --- a/packages/js/data/src/index.ts +++ b/packages/js/data/src/index.ts @@ -108,6 +108,7 @@ export { } from './product-categories/types'; export { TaxClass } from './tax-classes/types'; export { ProductTag, Query } from './product-tags/types'; +export { WCUser } from './user/types'; /** * Internal dependencies diff --git a/packages/js/product-editor/changelog/add-single_variation_missing_tracks_events b/packages/js/product-editor/changelog/add-single_variation_missing_tracks_events new file mode 100644 index 00000000000..bee19e671c4 --- /dev/null +++ b/packages/js/product-editor/changelog/add-single_variation_missing_tracks_events @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +[Single Variation] Add missing tracks events #40996 diff --git a/packages/js/product-editor/changelog/fix-checkbox-with-value b/packages/js/product-editor/changelog/fix-checkbox-with-value new file mode 100644 index 00000000000..339bbb4264f --- /dev/null +++ b/packages/js/product-editor/changelog/fix-checkbox-with-value @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Fix checkbox not working when checkedValue is provided + + diff --git a/packages/js/product-editor/changelog/fix-publish-btn-variations b/packages/js/product-editor/changelog/fix-publish-btn-variations new file mode 100644 index 00000000000..b195d221ceb --- /dev/null +++ b/packages/js/product-editor/changelog/fix-publish-btn-variations @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Fix add/update button interfering with 'status' for variations + + diff --git a/packages/js/product-editor/changelog/fix-variation_name b/packages/js/product-editor/changelog/fix-variation_name new file mode 100644 index 00000000000..3015b97baf5 --- /dev/null +++ b/packages/js/product-editor/changelog/fix-variation_name @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Update the variation name, by using the wc_get_formatted_variation. diff --git a/packages/js/product-editor/src/blocks/generic/checkbox/edit.tsx b/packages/js/product-editor/src/blocks/generic/checkbox/edit.tsx index d9013ff1cde..d1d28546daa 100644 --- a/packages/js/product-editor/src/blocks/generic/checkbox/edit.tsx +++ b/packages/js/product-editor/src/blocks/generic/checkbox/edit.tsx @@ -32,7 +32,7 @@ export function Edit( { return (
) { const blockProps = useWooBlockProps( attributes ); const { + _templateBlockId, label, property, disabled, @@ -30,6 +37,12 @@ export function Edit( { postType, fallbackValue: false, } ); + const productId = useEntityId( 'postType', postType ); + const [ parentId ] = useEntityProp< number >( + 'postType', + postType, + 'parent_id' + ); function isChecked() { if ( checkedValue !== undefined ) { @@ -39,6 +52,11 @@ export function Edit( { } function handleChange( checked: boolean ) { + recordEvent( 'product_toggle_click', { + block_id: _templateBlockId, + source: TRACKS_SOURCE, + product_id: parentId > 0 ? parentId : productId, + } ); if ( checked ) { setValue( checkedValue !== undefined ? checkedValue : checked ); } else { diff --git a/packages/js/product-editor/src/components/header/hooks/use-publish/use-publish.tsx b/packages/js/product-editor/src/components/header/hooks/use-publish/use-publish.tsx index 56805a3d44b..0c2e9dcf7f8 100644 --- a/packages/js/product-editor/src/components/header/hooks/use-publish/use-publish.tsx +++ b/packages/js/product-editor/src/components/header/hooks/use-publish/use-publish.tsx @@ -52,7 +52,8 @@ export function usePublish( { const isBusy = isSaving || isValidating; - const isPublished = productStatus === 'publish'; + const isPublished = + productType === 'product' ? productStatus === 'publish' : true; const { editEntityRecord, saveEditedEntityRecord } = useDispatch( 'core' ); @@ -62,17 +63,25 @@ export function usePublish( { } try { - await validate( { - status: 'publish', - } ); - - // The publish button click not only change the status of the product - // but also save all the pending changes. So even if the status is - // publish it's possible to save the product too. - if ( ! isPublished ) { - await editEntityRecord( 'postType', productType, productId, { + if ( productType === 'product' ) { + await validate( { status: 'publish', } ); + // The publish button click not only change the status of the product + // but also save all the pending changes. So even if the status is + // publish it's possible to save the product too. + if ( ! isPublished ) { + await editEntityRecord( + 'postType', + productType, + productId, + { + status: 'publish', + } + ); + } + } else { + await validate(); } const publishedProduct = await saveEditedEntityRecord< Product >( diff --git a/packages/js/product-editor/src/components/header/publish-button/publish-button.tsx b/packages/js/product-editor/src/components/header/publish-button/publish-button.tsx index 2d224609825..c67e0e49fec 100644 --- a/packages/js/product-editor/src/components/header/publish-button/publish-button.tsx +++ b/packages/js/product-editor/src/components/header/publish-button/publish-button.tsx @@ -33,7 +33,8 @@ export function PublishButton( { productStatus, ...props, onPublishSuccess( savedProduct: Product ) { - const isPublished = productStatus === 'publish'; + const isPublished = + productType === 'product' ? productStatus === 'publish' : true; if ( isPublished ) { recordProductEvent( 'product_update', savedProduct ); diff --git a/packages/js/product-editor/src/components/variations-table/variations-table.tsx b/packages/js/product-editor/src/components/variations-table/variations-table.tsx index 0730d6faa0e..438e9d46d48 100644 --- a/packages/js/product-editor/src/components/variations-table/variations-table.tsx +++ b/packages/js/product-editor/src/components/variations-table/variations-table.tsx @@ -167,6 +167,8 @@ export const VariationsTable = forwardRef< batchUpdateProductVariations, invalidateResolution, } = useDispatch( EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME ); + const { invalidateResolution: coreInvalidateResolution } = + useDispatch( 'core' ); const { generateProductVariations } = useProductVariationsHelper(); @@ -265,6 +267,16 @@ export const VariationsTable = forwardRef< invalidateResolution( 'getProductVariations', [ requestParams, ] ); + coreInvalidateResolution( 'getEntityRecord', [ + 'postType', + 'product', + productId, + ] ); + coreInvalidateResolution( 'getEntityRecord', [ + 'postType', + 'product_variation', + variationId, + ] ); } ) .finally( () => { setIsUpdating( ( prevState ) => ( { @@ -333,11 +345,24 @@ export const VariationsTable = forwardRef< delete: values.map( ( { id } ) => id ), } ) - .then( ( response: VariationResponseProps ) => + .then( ( response: VariationResponseProps ) => { invalidateResolution( 'getProductVariations', [ requestParams, - ] ).then( () => response ) - ) + ] ); + coreInvalidateResolution( 'getEntityRecord', [ + 'postType', + 'product', + productId, + ] ); + values.forEach( ( { id: variationId } ) => { + coreInvalidateResolution( 'getEntityRecord', [ + 'postType', + 'product_variation', + variationId, + ] ); + } ); + return response; + } ) .then( ( response: VariationResponseProps ) => { createSuccessNotice( getSnackbarText( response ) ); onVariationTableChange( 'delete' ); diff --git a/packages/js/product-editor/src/hooks/use-product-variations-helper.ts b/packages/js/product-editor/src/hooks/use-product-variations-helper.ts index ded80d9c1fd..0b332e2ec3f 100644 --- a/packages/js/product-editor/src/hooks/use-product-variations-helper.ts +++ b/packages/js/product-editor/src/hooks/use-product-variations-helper.ts @@ -65,6 +65,8 @@ export function useProductVariationsHelper() { generateProductVariations: _generateProductVariations, invalidateResolutionForStoreSelector, } = useDispatch( EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME ); + const { invalidateResolution: coreInvalidateResolution } = + useDispatch( 'core' ); const [ isGenerating, setIsGenerating ] = useState( false ); @@ -75,7 +77,7 @@ export function useProductVariationsHelper() { ) => { setIsGenerating( true ); - const { status: lastStatus } = await resolveSelect( + const { status: lastStatus, variations } = await resolveSelect( 'core' ).getEditedEntityRecord< Product >( 'postType', @@ -111,6 +113,20 @@ export function useProductVariationsHelper() { invalidateResolutionForStoreSelector( 'getProductVariations' ); + if ( variations && variations.length > 0 ) { + for ( const variationId of variations ) { + coreInvalidateResolution( 'getEntityRecord', [ + 'postType', + 'product_variation', + variationId, + ] ); + } + } + coreInvalidateResolution( 'getEntityRecord', [ + 'postType', + 'product', + productId, + ] ); return invalidateResolutionForStoreSelector( 'getProductVariationsTotalCount' ); diff --git a/packages/js/product-editor/src/utils/record-product-event.ts b/packages/js/product-editor/src/utils/record-product-event.ts index c2b9b6a3976..f85628a40ec 100644 --- a/packages/js/product-editor/src/utils/record-product-event.ts +++ b/packages/js/product-editor/src/utils/record-product-event.ts @@ -18,6 +18,7 @@ const potentialTrackableProductValueKeys = [ 'description', 'manage_stock', 'menu_order', + 'note', 'purchase_note', 'sale_price', 'short_description', @@ -43,6 +44,11 @@ export function recordProductEvent( product_type: type, }; + if ( product.parent_id > 0 ) { + product.note = product.description; + delete product.description; + } + for ( const productValueKey of Object.keys( product ) ) { if ( potentialTrackableProductValueKeys.includes( productValueKey ) ) { const eventPropKey = diff --git a/plugins/woo-ai/changelog/fix-webpack-build b/plugins/woo-ai/changelog/fix-webpack-build new file mode 100644 index 00000000000..31cc36fe7ae --- /dev/null +++ b/plugins/woo-ai/changelog/fix-webpack-build @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Fix Woo AI webpack build configuration. diff --git a/plugins/woo-ai/webpack.config.js b/plugins/woo-ai/webpack.config.js index 3bdf5e0eb8a..d131f0792b0 100644 --- a/plugins/woo-ai/webpack.config.js +++ b/plugins/woo-ai/webpack.config.js @@ -4,7 +4,7 @@ const WooCommerceDependencyExtractionWebpackPlugin = require( '@woocommerce/depe module.exports = { ...defaultConfig, entry: { - ...defaultConfig.entry, + index: './src/index.ts', }, module: { ...defaultConfig.module, diff --git a/plugins/woocommerce-admin/bin/modified-editsite-lock-unlock.js b/plugins/woocommerce-admin/bin/modified-editsite-lock-unlock.js new file mode 100644 index 00000000000..a9f0ec06e02 --- /dev/null +++ b/plugins/woocommerce-admin/bin/modified-editsite-lock-unlock.js @@ -0,0 +1,23 @@ +/** + * WordPress dependencies + */ +import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; + +let consentString = + 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.'; + +if ( window.wcSettings && window.wcSettings.wpVersion ) { + // Parse the version string as a floating-point number + const wpVersion = parseFloat( window.wcSettings.wpVersion ); + if ( ! isNaN( wpVersion ) && wpVersion >= 6.4 ) { + consentString = + 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.'; + } +} + +export const { lock, unlock } = + __dangerousOptInToUnstableAPIsOnlyForCoreModules( + consentString, + '@wordpress/edit-site' + ); +//# sourceMappingURL=lock-unlock.js.map diff --git a/plugins/woocommerce-admin/client/core-profiler/actions/tracks.tsx b/plugins/woocommerce-admin/client/core-profiler/actions/tracks.tsx index fee71d85f7d..36e876cba7a 100644 --- a/plugins/woocommerce-admin/client/core-profiler/actions/tracks.tsx +++ b/plugins/woocommerce-admin/client/core-profiler/actions/tracks.tsx @@ -76,12 +76,58 @@ const recordTracksSkipBusinessLocationCompleted = () => { } ); }; +// Temporarily expand the step viewed track for BusinessInfo so that we can include the experiment assignment +// Remove this and change the action back to recordTracksStepViewed when the experiment is over +const recordTracksStepViewedBusinessInfo = ( + context: CoreProfilerStateMachineContext, + _event: unknown, + { action }: { action: unknown } +) => { + const { step } = action as { step: string }; + recordEvent( 'coreprofiler_step_view', { + step, + email_marketing_experiment_assignment: + context.emailMarketingExperimentAssignment, + wc_version: getSetting( 'wcVersion' ), + } ); +}; + +const recordTracksIsEmailChanged = ( + context: CoreProfilerStateMachineContext, + event: BusinessInfoEvent +) => { + if ( context.emailMarketingExperimentAssignment === 'treatment' ) { + let emailSource, isEmailChanged; + if ( context.onboardingProfile.store_email ) { + emailSource = 'onboarding_profile_store_email'; // from previous entry + isEmailChanged = + event.payload.storeEmailAddress !== + context.onboardingProfile.store_email; + } else if ( context.currentUserEmail ) { + emailSource = 'current_user_email'; // from currentUser + isEmailChanged = + event.payload.storeEmailAddress !== context.currentUserEmail; + } else { + emailSource = 'was_empty'; + isEmailChanged = event.payload.storeEmailAddress?.length > 0; + } + + recordEvent( 'coreprofiler_email_marketing', { + opt_in: event.payload.isOptInMarketing, + email_field_prefilled_source: emailSource, + email_field_modified: isEmailChanged, + } ); + } +}; + const recordTracksBusinessInfoCompleted = ( - _context: CoreProfilerStateMachineContext, + context: CoreProfilerStateMachineContext, event: Extract< BusinessInfoEvent, { type: 'BUSINESS_INFO_COMPLETED' } > ) => { recordEvent( 'coreprofiler_step_complete', { step: 'business_info', + email_marketing_experiment_assignment: + context.emailMarketingExperimentAssignment, wc_version: getSetting( 'wcVersion' ), } ); @@ -92,8 +138,8 @@ const recordTracksBusinessInfoCompleted = ( ) === -1, industry: event.payload.industry, store_location_previously_set: - _context.onboardingProfile.is_store_country_set || false, - geolocation_success: _context.geolocatedLocation !== undefined, + context.onboardingProfile.is_store_country_set || false, + geolocation_success: context.geolocatedLocation !== undefined, geolocation_overruled: event.payload.geolocationOverruled, } ); }; @@ -180,4 +226,6 @@ export default { recordFailedPluginInstallations, recordSuccessfulPluginInstallation, recordTracksPluginsInstallationRequest, + recordTracksIsEmailChanged, + recordTracksStepViewedBusinessInfo, }; diff --git a/plugins/woocommerce-admin/client/core-profiler/index.tsx b/plugins/woocommerce-admin/client/core-profiler/index.tsx index 3960e774210..ef9616bd2f1 100644 --- a/plugins/woocommerce-admin/client/core-profiler/index.tsx +++ b/plugins/woocommerce-admin/client/core-profiler/index.tsx @@ -31,8 +31,13 @@ import { GeolocationResponse, PLUGINS_STORE_NAME, SETTINGS_STORE_NAME, + USER_STORE_NAME, + WCUser, } from '@woocommerce/data'; -import { initializeExPlat } from '@woocommerce/explat'; +import { + initializeExPlat, + loadExperimentAssignment, +} from '@woocommerce/explat'; import { CountryStateOption } from '@woocommerce/onboarding'; import { getAdminLink } from '@woocommerce/settings'; import CurrencyFactory from '@woocommerce/currency'; @@ -99,6 +104,8 @@ export type BusinessInfoEvent = { industry?: IndustryChoice; storeLocation: CountryStateOption[ 'key' ]; geolocationOverruled: boolean; + isOptInMarketing: boolean; + storeEmailAddress: string; }; }; @@ -139,6 +146,8 @@ export type OnboardingProfile = { selling_platforms: SellingPlatform[] | null; skip?: boolean; is_store_country_set: boolean | null; + store_email?: string; + is_agree_marketing?: boolean; }; export type PluginsPageSkippedEvent = { @@ -195,6 +204,8 @@ export type CoreProfilerStateMachineContext = { persistBusinessInfoRef?: ReturnType< typeof spawn >; spawnUpdateOnboardingProfileOptionRef?: ReturnType< typeof spawn >; spawnGeolocationRef?: ReturnType< typeof spawn >; + emailMarketingExperimentAssignment: 'treatment' | 'control'; + currentUserEmail: string | undefined; }; const getAllowTrackingOption = async () => @@ -309,6 +320,35 @@ const handleOnboardingProfileOption = assign( { }, } ); +const getMarketingOptInExperimentAssignment = async () => { + return loadExperimentAssignment( + `woocommerce_core_profiler_email_marketing_opt_in_2023_Q4_V1` + ); +}; + +const getCurrentUserEmail = async () => { + const currentUser: WCUser< 'email' > = await resolveSelect( + USER_STORE_NAME + ).getCurrentUser(); + return currentUser?.email; +}; + +const assignCurrentUserEmail = assign( { + currentUserEmail: ( + _context, + event: DoneInvokeEvent< string | undefined > + ) => { + if ( + event.data && + event.data.length > 0 && + event.data !== 'wordpress@example.com' // wordpress default prefilled email address + ) { + return event.data; + } + return undefined; + }, +} ); + const assignOnboardingProfile = assign( { onboardingProfile: ( _context, @@ -316,6 +356,17 @@ const assignOnboardingProfile = assign( { ) => event.data, } ); +const assignMarketingOptInExperimentAssignment = assign( { + emailMarketingExperimentAssignment: ( + _context, + event: DoneInvokeEvent< + Awaited< + ReturnType< typeof getMarketingOptInExperimentAssignment > + > + > + ) => event.data.variationName ?? 'control', +} ); + const getGeolocation = async ( context: CoreProfilerStateMachineContext ) => { if ( context.optInDataSharing ) { return resolveSelect( COUNTRIES_STORE_NAME ).geolocate(); @@ -499,6 +550,11 @@ const updateBusinessInfo = async ( ...refreshedOnboardingProfile, is_store_country_set: true, industry: [ event.payload.industry ], + is_agree_marketing: event.payload.isOptInMarketing, + store_email: + event.payload.storeEmailAddress.length > 0 + ? event.payload.storeEmailAddress + : null, }, } ); }; @@ -644,6 +700,8 @@ const coreProfilerMachineActions = { handleCountries, handleOnboardingProfileOption, assignOnboardingProfile, + assignMarketingOptInExperimentAssignment, + assignCurrentUserEmail, persistBusinessInfo, spawnUpdateOnboardingProfileOption, redirectToWooHome, @@ -657,6 +715,8 @@ const coreProfilerMachineServices = { getCountries, getGeolocation, getOnboardingProfileOption, + getMarketingOptInExperimentAssignment, + getCurrentUserEmail, getPlugins, browserPopstateHandler, updateBusinessInfo, @@ -693,6 +753,8 @@ export const coreProfilerStateMachineDefinition = createMachine( { loader: {}, onboardingProfile: {} as OnboardingProfile, jetpackAuthUrl: undefined, + emailMarketingExperimentAssignment: 'control', + currentUserEmail: undefined, } as CoreProfilerStateMachineContext, states: { navigate: { @@ -1026,6 +1088,45 @@ export const coreProfilerStateMachineDefinition = createMachine( { }, }, }, + marketingOptInExperiment: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'getMarketingOptInExperimentAssignment', + onDone: { + target: 'done', + actions: [ + 'assignMarketingOptInExperimentAssignment', + ], + }, + }, + }, + done: { type: 'final' }, + }, + }, + currentUserEmail: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'getCurrentUserEmail', + onDone: { + target: 'done', + actions: [ + 'assignCurrentUserEmail', + ], + }, + onError: { + target: 'done', + }, + }, + }, + done: { + type: 'final', + }, + }, + }, }, // onDone is reached when child parallel states fo fetching are resolved (reached final states) onDone: { @@ -1039,14 +1140,17 @@ export const coreProfilerStateMachineDefinition = createMachine( { }, entry: [ { - type: 'recordTracksStepViewed', + type: 'recordTracksStepViewedBusinessInfo', step: 'business_info', }, ], on: { BUSINESS_INFO_COMPLETED: { target: 'postBusinessInfo', - actions: [ 'recordTracksBusinessInfoCompleted' ], + actions: [ + 'recordTracksBusinessInfoCompleted', + 'recordTracksIsEmailChanged', + ], }, }, }, diff --git a/plugins/woocommerce-admin/client/core-profiler/pages/BusinessInfo.tsx b/plugins/woocommerce-admin/client/core-profiler/pages/BusinessInfo.tsx index a4b558417d1..2d0e9a075b0 100644 --- a/plugins/woocommerce-admin/client/core-profiler/pages/BusinessInfo.tsx +++ b/plugins/woocommerce-admin/client/core-profiler/pages/BusinessInfo.tsx @@ -2,7 +2,13 @@ * External dependencies */ import { __ } from '@wordpress/i18n'; -import { Button, TextControl, Notice, Spinner } from '@wordpress/components'; +import { + Button, + TextControl, + Notice, + Spinner, + CheckboxControl, +} from '@wordpress/components'; import { SelectControl } from '@woocommerce/components'; import { Icon, chevronDown } from '@wordpress/icons'; import { @@ -83,9 +89,18 @@ export type BusinessInfoContextProps = Pick< > & { onboardingProfile: Pick< CoreProfilerStateMachineContext[ 'onboardingProfile' ], - 'industry' | 'business_choice' | 'is_store_country_set' + | 'industry' + | 'business_choice' + | 'is_store_country_set' + | 'is_agree_marketing' + | 'store_email' + >; +} & Partial< + Pick< + CoreProfilerStateMachineContext, + 'emailMarketingExperimentAssignment' | 'currentUserEmail' + > >; -}; export const BusinessInfo = ( { context, @@ -105,7 +120,11 @@ export const BusinessInfo = ( { is_store_country_set: isStoreCountrySet, industry: industryFromOnboardingProfile, business_choice: businessChoiceFromOnboardingProfile, + is_agree_marketing: isOptInMarketingFromOnboardingProfile, + store_email: storeEmailAddressFromOnboardingProfile, }, + emailMarketingExperimentAssignment, + currentUserEmail, } = context; const [ storeName, setStoreName ] = useState( @@ -176,6 +195,14 @@ export const BusinessInfo = ( { const [ hasSubmitted, setHasSubmitted ] = useState( false ); + const [ storeEmailAddress, setEmailAddress ] = useState( + storeEmailAddressFromOnboardingProfile || currentUserEmail || '' + ); + + const [ isOptInMarketing, setIsOptInMarketing ] = useState< boolean >( + isOptInMarketingFromOnboardingProfile || false + ); + return (
) } + { emailMarketingExperimentAssignment === 'treatment' && ( + <> + { + setEmailAddress( value ); + } } + value={ decodeEntities( storeEmailAddress ) } + label={ + <> + { __( + 'Your email address', + 'woocommerce' + ) } + { isOptInMarketing && ( + + { '*' } + + ) } + + } + placeholder={ __( + 'wordpress@example.com', + 'woocommerce' + ) } + /> + + + ) }
diff --git a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/sidebar-navigation-screen-logo.tsx b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/sidebar-navigation-screen-logo.tsx index 0e27b3c67bc..ce6ed61a23e 100644 --- a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/sidebar-navigation-screen-logo.tsx +++ b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/sidebar-navigation-screen-logo.tsx @@ -176,17 +176,11 @@ const LogoSettings = ( { const isWideAligned = [ 'wide', 'full' ].includes( align ); const isResizable = ! isWideAligned && isLargeViewport; - const { maxWidth } = useSelect( ( select ) => { - // @ts-ignore No types for this exist yet. - const settings = select( blockEditorStore ).getSettings(); - return { - maxWidth: settings.maxWidth, - }; - }, [] ); + const maxWidth = 200; // Set the default width to a responsible size. // Note that this width is also set in the attached frontend CSS file. - const defaultWidth = 120; + const defaultWidth = 60; const currentWidth = width || defaultWidth; const ratio = naturalWidth / naturalHeight; @@ -218,7 +212,7 @@ const LogoSettings = ( { setAttributes( { width: newWidth } ) } min={ minWidth } - max={ maxWidthBuffer } + max={ maxWidth } initialPosition={ Math.min( defaultWidth, maxWidthBuffer ) } value={ currentWidth } disabled={ ! isResizable } @@ -367,9 +361,7 @@ const LogoEdit = ( { export const SidebarNavigationScreenLogo = () => { // Get the current logo block client ID and attributes. These are used for the logo settings. - const { - logoBlock: { clientId, isLoading: isLogoBlockLoading }, - } = useContext( LogoBlockContext ); + const { logoBlockIds } = useContext( LogoBlockContext ); const { attributes, @@ -381,7 +373,7 @@ export const SidebarNavigationScreenLogo = () => { ( select ) => { const logoBlocks = // @ts-ignore No types for this exist yet. - select( blockEditorStore ).getBlocksByClientId( clientId ); + select( blockEditorStore ).getBlocksByClientId( logoBlockIds ); const _isAttributesLoading = ! logoBlocks.length || logoBlocks[ 0 ] === null; @@ -398,7 +390,7 @@ export const SidebarNavigationScreenLogo = () => { isAttributesLoading: _isAttributesLoading, }; }, - [ clientId ] + [ logoBlockIds ] ); const { siteLogoId, canUserEdit, mediaItemData, isRequestingMediaItem } = @@ -441,16 +433,16 @@ export const SidebarNavigationScreenLogo = () => { // @ts-ignore No types for this exist yet. const { updateBlockAttributes } = useDispatch( blockEditorStore ); const setAttributes = ( newAttributes: LogoAttributes ) => { - if ( ! clientId ) { + if ( ! logoBlockIds.length ) { return; } - updateBlockAttributes( clientId, newAttributes ); + logoBlockIds.forEach( ( clientId ) => + updateBlockAttributes( clientId, newAttributes ) + ); }; - const isLoading = siteLogoId === undefined || isRequestingMediaItem || - isLogoBlockLoading || isAttributesLoading; return ( diff --git a/plugins/woocommerce-admin/client/customize-store/assembler-hub/site-hub.tsx b/plugins/woocommerce-admin/client/customize-store/assembler-hub/site-hub.tsx index e0c7d121ed8..099d26733de 100644 --- a/plugins/woocommerce-admin/client/customize-store/assembler-hub/site-hub.tsx +++ b/plugins/woocommerce-admin/client/customize-store/assembler-hub/site-hub.tsx @@ -21,7 +21,8 @@ import { decodeEntities } from '@wordpress/html-entities'; import { forwardRef } from '@wordpress/element'; // @ts-ignore No types for this exist yet. import SiteIcon from '@wordpress/edit-site/build-module/components/site-icon'; - +import { getNewPath } from '@woocommerce/navigation'; +import { Link } from '@woocommerce/components'; /** * Internal dependencies */ @@ -93,7 +94,12 @@ export const SiteHub = forwardRef( ease: 'easeOut', } } > - + + + diff --git a/plugins/woocommerce-admin/client/customize-store/assembler-hub/style.scss b/plugins/woocommerce-admin/client/customize-store/assembler-hub/style.scss index 6631974b55f..ac8b9e016c4 100644 --- a/plugins/woocommerce-admin/client/customize-store/assembler-hub/style.scss +++ b/plugins/woocommerce-admin/client/customize-store/assembler-hub/style.scss @@ -53,6 +53,12 @@ } } +.woocommerce-customize-store { + .edit-site-site-hub__view-mode-toggle-container a { + color: unset; + } +} + .woocommerce-customize-store__step-assemblerHub { a { text-decoration: none; @@ -84,6 +90,7 @@ padding-bottom: 0; gap: 0; width: 348px; + z-index: 2; } .edit-site-sidebar-navigation-screen-patterns__group-header { @@ -141,6 +148,20 @@ padding: 0 16px; overflow-x: hidden; flex: 1; + + &::-webkit-scrollbar-thumb { + background-color: #c1c1c1; + } + + &::-webkit-scrollbar-track-piece:start { + background: transparent; + margin-top: 250px; + } + + &::-webkit-scrollbar-track-piece:end { + background: transparent; + margin-bottom: 400px; + } } } @@ -354,6 +375,10 @@ } } + .block-editor-block-patterns-list__item-title { + display: none; + } + /* Color sidebar */ .woocommerce-customize-store__color-panel-container { @@ -445,7 +470,7 @@ /* Layout sidebar */ .block-editor-block-patterns-list__item { .block-editor-block-preview__container { - border-radius: 2px; + border-radius: 4px; border: 1.5px solid transparent; } @@ -480,27 +505,7 @@ .edit-site-resizable-frame__handle { background: var(--wp-admin-theme-color); - - .components-popover { - display: inline-flex; - padding: 0 10px; - align-items: flex-start; - gap: 10px; - background: var(--wp-admin-theme-color-background-25); - left: 5px !important; - border-radius: 4px; - height: 20px; - - .components-popover__content { - color: var(--wp-admin-theme-color-darker-20); - font-size: 0.75rem; - font-style: normal; - font-weight: 500; - line-height: 20px; /* 166.667% */ - background: inherit; - padding: 0; - } - } + cursor: ew-resize; } .edit-site-layout__canvas .components-resizable-box__container { @@ -660,3 +665,28 @@ stroke: rgba($black, 0.3); } } + + +.woocommerce-assembler-hub__resizable-frame__drag-handler { + display: inline-flex; + padding: 0 10px; + align-items: flex-start; + gap: 10px; + background: var(--wp-admin-theme-color-background-25); + left: 5px !important; + border-radius: 4px; + height: 20px; + + .components-popover__content { + color: var(--wp-admin-theme-color-darker-20); + font-size: 0.75rem; + font-style: normal; + font-weight: 500; + line-height: 20px; /* 166.667% */ + background: inherit; + padding: 0; + margin-left: 10px; + width: max-content; + box-shadow: none; + } +} diff --git a/plugins/woocommerce-admin/client/customize-store/design-with-ai/actions.ts b/plugins/woocommerce-admin/client/customize-store/design-with-ai/actions.ts index 357620220af..c24d6092bf6 100644 --- a/plugins/woocommerce-admin/client/customize-store/design-with-ai/actions.ts +++ b/plugins/woocommerce-admin/client/customize-store/design-with-ai/actions.ts @@ -29,6 +29,7 @@ import { lookAndFeelCompleteEvent, toneOfVoiceCompleteEvent, } from './pages'; +import { attachIframeListeners, onIframeLoad } from '../utils'; const assignBusinessInfoDescription = assign< designWithAiStateMachineContext, @@ -116,7 +117,7 @@ const assignFontPairing = assign< fontPairing = 'Bodoni Moda + Overpass'; break; case choice === 'Bold': - fontPairing = 'Rubik + Inter'; + fontPairing = 'Plus Jakarta Sans + Plus Jakarta Sans'; break; } @@ -276,12 +277,33 @@ const recordTracksStepCompleted = ( } ); }; -const redirectToAssemblerHub = () => { - window.location.href = getNewPath( - {}, - '/customize-store/assembler-hub', - {} - ); +const redirectToAssemblerHub = async () => { + const assemblerUrl = getNewPath( {}, '/customize-store/assembler-hub', {} ); + const iframe = document.createElement( 'iframe' ); + iframe.classList.add( 'cys-fullscreen-iframe' ); + iframe.src = assemblerUrl; + + const showIframe = () => { + const loader = document.getElementsByClassName( + 'woocommerce-onboarding-loader' + ); + if ( loader[ 0 ] ) { + ( loader[ 0 ] as HTMLElement ).style.display = 'none'; + } + iframe.style.opacity = '1'; + }; + + iframe.onload = () => { + // Hide loading UI + attachIframeListeners( iframe ); + onIframeLoad( showIframe ); + + // Ceiling wait time set to 60 seconds + setTimeout( showIframe, 60 * 1000 ); + window.history?.pushState( {}, '', assemblerUrl ); + }; + + document.body.appendChild( iframe ); }; export const actions = { diff --git a/plugins/woocommerce-admin/client/customize-store/design-with-ai/pages/ApiCallLoader.tsx b/plugins/woocommerce-admin/client/customize-store/design-with-ai/pages/ApiCallLoader.tsx index 89095f36d6b..06eec7ac38a 100644 --- a/plugins/woocommerce-admin/client/customize-store/design-with-ai/pages/ApiCallLoader.tsx +++ b/plugins/woocommerce-admin/client/customize-store/design-with-ai/pages/ApiCallLoader.tsx @@ -91,7 +91,7 @@ export const ApiCallLoader = () => { return ( - + { loaderSteps.map( ( step, index ) => ( diff --git a/plugins/woocommerce-admin/client/customize-store/design-with-ai/prompts/colorChoices.ts b/plugins/woocommerce-admin/client/customize-store/design-with-ai/prompts/colorChoices.ts index 11ddcd738a5..f89948eb523 100644 --- a/plugins/woocommerce-admin/client/customize-store/design-with-ai/prompts/colorChoices.ts +++ b/plugins/woocommerce-admin/client/customize-store/design-with-ai/prompts/colorChoices.ts @@ -17,12 +17,20 @@ const colorChoices: ColorPalette[] = [ lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, { - name: 'Crimson Tide', - primary: '#A02040', - secondary: '#234B57', - foreground: '#871C37', + name: 'Arctic Dawn', + primary: '#243156', + secondary: '#DE5853', + foreground: '#243156', background: '#ffffff', - lookAndFeel: [ 'Bold' ] as Look[], + lookAndFeel: [ 'Contemporary' ] as Look[], + }, + { + name: 'Bronze Serenity', + primary: '#1e4b4b', + secondary: '#9e7047', + foreground: '#1e4b4b', + background: '#ffffff', + lookAndFeel: [ 'Classic' ], }, { name: 'Purple Twilight', @@ -32,76 +40,28 @@ const colorChoices: ColorPalette[] = [ background: '#fefbff', lookAndFeel: [ 'Bold' ] as Look[], }, + { + name: 'Candy Store', + primary: '#293852', + secondary: '#f1bea7', + foreground: '#293852', + background: '#ffffff', + lookAndFeel: [ 'Classic' ], + }, { name: 'Midnight Citrus', primary: '#1B1736', secondary: '#7E76A3', foreground: '#1B1736', background: '#ffffff', - lookAndFeel: [ 'Bold' ] as Look[], + lookAndFeel: [ 'Bold', 'Contemporary' ] as Look[], }, { - name: 'Lemon Myrtle', - primary: '#3E7172', - secondary: '#FC9B00', - foreground: '#325C5D', + name: 'Crimson Tide', + primary: '#A02040', + secondary: '#234B57', + foreground: '#871C37', background: '#ffffff', - lookAndFeel: [ 'Contemporary' ] as Look[], - }, - { - name: 'Green Thumb', - primary: '#164A41', - secondary: '#4B7B4D', - foreground: '#164A41', - background: '#ffffff', - lookAndFeel: [ 'Contemporary' ] as Look[], - }, - { - name: 'Golden Haze', - primary: '#232224', - secondary: '#EBB54F', - foreground: '#515151', - background: '#ffffff', - lookAndFeel: [ 'Contemporary', 'Bold' ] as Look[], - }, - { - name: 'Golden Indigo', - primary: '#4866C0', - secondary: '#C09F50', - foreground: '#405AA7', - background: '#ffffff', - lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], - }, - { - name: 'Arctic Dawn', - primary: '#243156', - secondary: '#DE5853', - foreground: '#243156', - background: '#ffffff', - lookAndFeel: [ 'Contemporary' ] as Look[], - }, - { - name: 'Jungle Sunrise', - primary: '#1a4435', - secondary: '#ed774e', - foreground: '#0a271d', - background: '#fefbec', - lookAndFeel: [ 'Classic' ] as Look[], - }, - { - name: 'Berry Grove', - primary: '#1F351A', - secondary: '#DE76DE', - foreground: '#1f351a', - background: '#fdfaf1', - lookAndFeel: [ 'Classic' ] as Look[], - }, - { - name: 'Fuchsia', - primary: '#b7127f', - secondary: '#18020C', - foreground: '#b7127f', - background: '#f7edf6', lookAndFeel: [ 'Bold' ] as Look[], }, { @@ -112,29 +72,21 @@ const colorChoices: ColorPalette[] = [ background: '#eeeae6', lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, - { - name: 'Canary', - primary: '#0F0F05', - secondary: '#353535', - foreground: '#0F0F05', - background: '#FCFF9B', - lookAndFeel: [ 'Bold' ] as Look[], - }, { name: 'Gumtree Sunset', primary: '#476C77', secondary: '#EFB071', foreground: '#476C77', background: '#edf4f4', - lookAndFeel: [ 'Contemporary' ] as Look[], + lookAndFeel: [ 'Classic' ] as Look[], }, { - name: 'Ice', - primary: '#12123F', - secondary: '#3473FE', - foreground: '#12123F', - background: '#F1F4FA', - lookAndFeel: [ 'Contemporary' ] as Look[], + name: 'Fuchsia', + primary: '#b7127f', + secondary: '#18020C', + foreground: '#b7127f', + background: '#f7edf6', + lookAndFeel: [ 'Bold' ] as Look[], }, { name: 'Cinder', @@ -144,6 +96,14 @@ const colorChoices: ColorPalette[] = [ background: '#f1f2f2', lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, + { + name: 'Canary', + primary: '#0F0F05', + secondary: '#353535', + foreground: '#0F0F05', + background: '#FCFF9B', + lookAndFeel: [ 'Bold' ] as Look[], + }, { name: 'Blue Lagoon', primary: '#004DE5', @@ -153,19 +113,27 @@ const colorChoices: ColorPalette[] = [ lookAndFeel: [ 'Bold', 'Contemporary' ] as Look[], }, { - name: 'Sandalwood Oasis', - primary: '#F0EBE3', - secondary: '#DF9785', - foreground: '#ffffff', - background: '#2a2a16', - lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], + name: 'Vibrant Berry', + primary: '#7C1D6F', + secondary: '#C62FB2', + foreground: '#7C1D6F', + background: '#FFEED6', + lookAndFeel: [ 'Classic', 'Bold' ], }, { - name: 'Rustic Rosewood', - primary: '#F4F4F2', - secondary: '#EE797C', + name: 'Aquamarine Night', + primary: '#deffef', + secondary: '#56fbb9', foreground: '#ffffff', - background: '#1A1A1A', + background: '#091C48', + lookAndFeel: [ 'Bold' ] as Look[], + }, + { + name: 'Evergreen Twilight', + primary: '#ffffff', + secondary: '#8EE978', + foreground: '#ffffff', + background: '#181818', lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, { @@ -176,14 +144,6 @@ const colorChoices: ColorPalette[] = [ background: '#3C3F4D', lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, - { - name: 'Lilac Nightshade', - primary: '#f5d6ff', - secondary: '#C48DDA', - foreground: '#ffffff', - background: '#000000', - lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], - }, { name: 'Lightning', primary: '#ebffd2', @@ -193,12 +153,12 @@ const colorChoices: ColorPalette[] = [ lookAndFeel: [ 'Bold' ] as Look[], }, { - name: 'Aquamarine Night', - primary: '#deffef', - secondary: '#56fbb9', + name: 'Lilac Nightshade', + primary: '#f5d6ff', + secondary: '#C48DDA', foreground: '#ffffff', - background: '#091C48', - lookAndFeel: [ 'Bold' ] as Look[], + background: '#000000', + lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, { name: 'Charcoal', @@ -209,11 +169,19 @@ const colorChoices: ColorPalette[] = [ lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, { - name: 'Evergreen Twilight', - primary: '#ffffff', - secondary: '#8EE978', + name: 'Rustic Rosewood', + primary: '#F4F4F2', + secondary: '#EE797C', foreground: '#ffffff', - background: '#181818', + background: '#1A1A1A', + lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], + }, + { + name: 'Sandalwood Oasis', + primary: '#F0EBE3', + secondary: '#DF9785', + foreground: '#ffffff', + background: '#2a2a16', lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, { @@ -225,6 +193,7 @@ const colorChoices: ColorPalette[] = [ lookAndFeel: [ 'Contemporary', 'Classic' ] as Look[], }, ]; + const allowedNames: string[] = colorChoices.map( ( palette ) => palette.name ); const hexColorRegex = /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/; const colorPaletteNameValidator = z diff --git a/plugins/woocommerce-admin/client/customize-store/design-with-ai/prompts/test/colorChoices.test.ts b/plugins/woocommerce-admin/client/customize-store/design-with-ai/prompts/test/colorChoices.test.ts index cff531b7838..2878bd2243c 100644 --- a/plugins/woocommerce-admin/client/customize-store/design-with-ai/prompts/test/colorChoices.test.ts +++ b/plugins/woocommerce-admin/client/customize-store/design-with-ai/prompts/test/colorChoices.test.ts @@ -186,8 +186,8 @@ describe( 'colorPaletteResponseValidator', () => { 'Lightning', 'Midnight Citrus', 'Purple Twilight', - 'Crimson Tide', - 'Ice', + 'Fuchsia', + 'Charcoal', ], }; it( 'should validate a correct color palette response', () => { diff --git a/plugins/woocommerce-admin/client/customize-store/index.tsx b/plugins/woocommerce-admin/client/customize-store/index.tsx index 2c23d0f7968..704b3d18eeb 100644 --- a/plugins/woocommerce-admin/client/customize-store/index.tsx +++ b/plugins/woocommerce-admin/client/customize-store/index.tsx @@ -38,6 +38,7 @@ import { } from './types'; import { ThemeCard } from './intro/types'; import './style.scss'; +import { navigateOrParent, attachParentListeners } from './utils'; export type customizeStoreStateMachineEvents = | introEvents @@ -65,7 +66,8 @@ const updateQueryStep = ( }; const redirectToWooHome = () => { - window.location.href = getNewPath( {}, '/', {} ); + const url = getNewPath( {}, '/', {} ); + navigateOrParent( window, url ); }; const redirectToThemes = ( _context: customizeStoreStateMachineContext ) => { @@ -360,6 +362,12 @@ export const CustomizeStoreController = ( { } }, [ CurrentComponent, currentNodeMeta?.component ] ); + // Run listeners for parent window. + useEffect( () => { + const removeListener = attachParentListeners(); + return removeListener; + }, [] ); + const currentNodeCssLabel = state.value instanceof Object ? Object.keys( state.value )[ 0 ] diff --git a/plugins/woocommerce-admin/client/customize-store/intro/intro-banners.tsx b/plugins/woocommerce-admin/client/customize-store/intro/intro-banners.tsx index e27a600832a..4e2fa08bc86 100644 --- a/plugins/woocommerce-admin/client/customize-store/intro/intro-banners.tsx +++ b/plugins/woocommerce-admin/client/customize-store/intro/intro-banners.tsx @@ -10,6 +10,7 @@ import { getNewPath } from '@woocommerce/navigation'; * Internal dependencies */ import { Intro } from '.'; +import { navigateOrParent } from '../utils'; export const BaseIntroBanner = ( { bannerTitle, @@ -190,10 +191,9 @@ export const ExistingAiThemeBanner = ( { bannerClass="existing-ai-theme-banner" buttonIsLink={ false } bannerButtonOnClick={ () => { - window.location.href = getNewPath( - {}, - '/customize-store/assembler-hub', - {} + navigateOrParent( + window, + getNewPath( {}, '/customize-store/assembler-hub', {} ) ); } } bannerButtonText={ __( 'Customize', 'woocommerce' ) } diff --git a/plugins/woocommerce-admin/client/customize-store/style.scss b/plugins/woocommerce-admin/client/customize-store/style.scss index d926bdfbe16..308f74306c2 100644 --- a/plugins/woocommerce-admin/client/customize-store/style.scss +++ b/plugins/woocommerce-admin/client/customize-store/style.scss @@ -21,6 +21,15 @@ .woocommerce-layout__main { padding-right: 0; } + + .edit-site-site-icon__image { + background: transparent; + border-radius: 4px; + height: auto; + -o-object-fit: cover; + object-fit: cover; + width: 100%; + } } body.woocommerce-customize-store.js.is-fullscreen-mode { @@ -158,3 +167,16 @@ body.woocommerce-customize-store.js.is-fullscreen-mode { height: initial; } } + +.cys-fullscreen-iframe { + display: block; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + border: none; + z-index: 9999; + transition: opacity 1.2s linear; + opacity: 0; +} diff --git a/plugins/woocommerce-admin/client/customize-store/transitional/index.tsx b/plugins/woocommerce-admin/client/customize-store/transitional/index.tsx index 82ff2f3c216..8c5b5be9a4c 100644 --- a/plugins/woocommerce-admin/client/customize-store/transitional/index.tsx +++ b/plugins/woocommerce-admin/client/customize-store/transitional/index.tsx @@ -23,6 +23,7 @@ import { SiteHub } from '../assembler-hub/site-hub'; import { ADMIN_URL } from '~/utils/admin-settings'; import './style.scss'; +import { navigateOrParent } from '../utils'; export type events = { type: 'GO_BACK_TO_HOME' }; @@ -97,7 +98,10 @@ export const Transitional = ( { recordEvent( 'customize_your_store_transitional_editor_click' ); - window.location.href = `${ ADMIN_URL }site-editor.php`; + navigateOrParent( + window, + `${ ADMIN_URL }site-editor.php` + ); } } > { __( 'Go to the Editor', 'woocommerce' ) } diff --git a/plugins/woocommerce-admin/client/customize-store/utils.js b/plugins/woocommerce-admin/client/customize-store/utils.js new file mode 100644 index 00000000000..2d44e753d09 --- /dev/null +++ b/plugins/woocommerce-admin/client/customize-store/utils.js @@ -0,0 +1,101 @@ +export function sendMessageToParent( message ) { + window.parent.postMessage( message, '*' ); +} + +export function isIframe( windowObject ) { + return windowObject.document !== windowObject.parent.document; +} + +export function editorIsLoaded() { + window.parent.postMessage( { type: 'iframe-loaded' }, '*' ); +} + +export function onIframeLoad( callback ) { + window.addEventListener( 'message', ( event ) => { + if ( event.data.type === 'iframe-loaded' ) { + callback(); + } + } ); +} + +/** + * Attach a listener to the window object to listen for messages from the parent window. + * + * @return {() => void} Remove listener function + */ +export function attachParentListeners() { + const listener = ( event ) => { + if ( event.data.type === 'navigate' ) { + window.location.href = event.data.url; + } + }; + + window.addEventListener( 'message', listener, false ); + + return () => { + window.removeEventListener( 'message', listener, false ); + }; +} + +/** + * If iframe, post message. Otherwise, navigate to a URL. + * + * @param {*} windowObject + * @param {*} url + */ +export function navigateOrParent( windowObject, url ) { + if ( isIframe( windowObject ) ) { + windowObject.parent.postMessage( { type: 'navigate', url }, '*' ); + } else { + windowObject.location.href = url; + } +} + +/** + * Attach listeners to an iframe to intercept and redirect navigation events. + * + * @param {HTMLIFrameElement} iframe + */ +export function attachIframeListeners( iframe ) { + const iframeWindow = iframe.contentWindow; + const iframeDocument = + iframe.contentDocument || iframe.contentWindow?.document; + + // Listen for pushstate event + if ( iframeWindow?.history ) { + iframeWindow.history.pushState = function ( state, title, url ) { + const urlString = url?.toString(); + if ( urlString ) { + // If the URL is not the Assembler Hub, navigate the main window to the new URL. + if ( urlString?.indexOf( 'customize-store' ) === -1 ) { + window.location.href = urlString; + } else { + window.history.pushState( state, title, url ); // Update the main window's history + } + } + }; + } + + // Listen for popstate event + iframeWindow?.addEventListener( 'popstate', function ( event ) { + window.history.replaceState( + event.state, + '', + iframeWindow.location.href + ); + } ); + + // Intercept external link clicks + iframeDocument?.addEventListener( 'click', function ( event ) { + if ( event.target ) { + const anchor = event.target?.closest( 'a' ); + if ( anchor && anchor.target === '_blank' ) { + event.preventDefault(); + window.open( anchor.href, '_blank' ); // Open in new tab in parent + } else if ( anchor ) { + event.preventDefault(); + window.location.href = anchor.href; // Navigate parent to new URL + } + } + } ); +} diff --git a/plugins/woocommerce-admin/client/dashboard/components/connect/index.js b/plugins/woocommerce-admin/client/dashboard/components/connect/index.js index fac71a3410a..15004569f3e 100644 --- a/plugins/woocommerce-admin/client/dashboard/components/connect/index.js +++ b/plugins/woocommerce-admin/client/dashboard/components/connect/index.js @@ -7,26 +7,29 @@ import { Component, Fragment } from '@wordpress/element'; import { compose } from '@wordpress/compose'; import PropTypes from 'prop-types'; import { withDispatch, withSelect } from '@wordpress/data'; -import { PLUGINS_STORE_NAME } from '@woocommerce/data'; +import { ONBOARDING_STORE_NAME } from '@woocommerce/data'; +/** + * Button redirecting to Jetpack auth flow. + * + * Only render this component when the user has accepted Jetpack's Terms of Service. + * The API endpoint used by this component sets "jetpack_tos_agreed" to true when + * returning the URL. + */ export class Connect extends Component { constructor( props ) { super( props ); this.state = { - isConnecting: false, + isAwaitingRedirect: false, + isRedirecting: false, }; this.connectJetpack = this.connectJetpack.bind( this ); - props.setIsPending( true ); + props.setIsPending( false ); } componentDidUpdate( prevProps ) { - const { createNotice, error, isRequesting, onError, setIsPending } = - this.props; - - if ( prevProps.isRequesting && ! isRequesting ) { - setIsPending( false ); - } + const { createNotice, error, onError, isRequesting } = this.props; if ( error && error !== prevProps.error ) { if ( onError ) { @@ -34,37 +37,35 @@ export class Connect extends Component { } createNotice( 'error', error ); } + + if ( + this.state.isAwaitingRedirect && + ! this.state.isRedirecting && + ! isRequesting && + ! error + ) { + this.setState( { isRedirecting: true }, () => { + window.location = this.props.jetpackAuthUrl; + } ); + } } - async connectJetpack() { - const { jetpackConnectUrl, onConnect } = this.props; + connectJetpack() { + const { onConnect } = this.props; - this.setState( - { - isConnecting: true, - }, - () => { - if ( onConnect ) { - onConnect(); - } - window.location = jetpackConnectUrl; - } - ); + if ( onConnect ) { + onConnect(); + } + + this.setState( { isAwaitingRedirect: true } ); } render() { - const { - hasErrors, - isRequesting, - onSkip, - skipText, - onAbort, - abortText, - } = this.props; + const { error, onSkip, skipText, onAbort, abortText } = this.props; return ( - { hasErrors ? ( + { error ? ( ) : ( ) : ( - + ), }, ]; diff --git a/plugins/woocommerce-admin/client/task-lists/fills/experimental-shipping-recommendation/test/shipping-recommendation.tsx b/plugins/woocommerce-admin/client/task-lists/fills/experimental-shipping-recommendation/test/shipping-recommendation.tsx index fcf234cff4d..091274b6e00 100644 --- a/plugins/woocommerce-admin/client/task-lists/fills/experimental-shipping-recommendation/test/shipping-recommendation.tsx +++ b/plugins/woocommerce-admin/client/task-lists/fills/experimental-shipping-recommendation/test/shipping-recommendation.tsx @@ -60,7 +60,20 @@ const ShippingRecommendation = ( props: ShippingRecommendationProps ) => { }; describe( 'ShippingRecommendation', () => { - test( 'should show plugins step when jetpack is not installed and activated', () => { + test( 'should show plugins step when woocommerce-services is not installed and activated', () => { + const { getByRole } = render( + + ); + expect( + getByRole( 'button', { name: 'Install & enable' } ) + ).toBeInTheDocument(); + } ); + + test( 'should show connect step when WCS&T is activated but not yet connected', () => { const { getByRole } = render( { activePlugins={ [ 'woocommerce-services' ] } /> ); - expect( - getByRole( 'button', { name: 'Install & enable' } ) - ).toBeInTheDocument(); - } ); - - test( 'should show plugins step when woocommerce-services is not installed and activated', () => { - const { getByRole } = render( - - ); - expect( - getByRole( 'button', { name: 'Install & enable' } ) - ).toBeInTheDocument(); - } ); - - test( 'should show connect step when both plugins are activated', () => { - const { getByRole } = render( - - ); expect( getByRole( 'button', { name: 'Connect' } ) ).toBeInTheDocument(); } ); - test( 'should show "complete task" button when both plugins are activated and jetpack is connected', () => { + test( 'should show "complete task" button when WCS&T is activated and Jetpack is connected', () => { const { getByRole } = render( ); expect( @@ -117,7 +104,7 @@ describe( 'ShippingRecommendation', () => { ); diff --git a/plugins/woocommerce-admin/client/task-lists/fills/index.ts b/plugins/woocommerce-admin/client/task-lists/fills/index.ts index da4ec370ce4..bae3bf48a5f 100644 --- a/plugins/woocommerce-admin/client/task-lists/fills/index.ts +++ b/plugins/woocommerce-admin/client/task-lists/fills/index.ts @@ -9,7 +9,6 @@ import './appearance'; import './tax'; import './woocommerce-payments'; import './deprecated-tasks'; -import './customize-store-tasklist-item'; const possiblyImportProductTask = async () => { if ( isImportProduct() ) { diff --git a/plugins/woocommerce-admin/client/task-lists/fills/products/use-create-product-by-type.ts b/plugins/woocommerce-admin/client/task-lists/fills/products/use-create-product-by-type.ts index cb3827548e4..d218ce265b9 100644 --- a/plugins/woocommerce-admin/client/task-lists/fills/products/use-create-product-by-type.ts +++ b/plugins/woocommerce-admin/client/task-lists/fills/products/use-create-product-by-type.ts @@ -16,7 +16,7 @@ import { createNoticesFromResponse } from '../../../lib/notices'; import { getAdminSetting } from '~/utils/admin-settings'; const EXPERIMENT_NAME = - 'woocommerce_product_creation_experience_add_variations_202310_v1'; + 'woocommerce_product_creation_experience_add_variations_202310_v2'; export const useCreateProductByType = () => { const { createProductFromTemplate } = useDispatch( ITEMS_STORE_NAME ); diff --git a/plugins/woocommerce-admin/client/task-lists/fills/shipping/index.js b/plugins/woocommerce-admin/client/task-lists/fills/shipping/index.js index 77564cbe5be..69fce37f918 100644 --- a/plugins/woocommerce-admin/client/task-lists/fills/shipping/index.js +++ b/plugins/woocommerce-admin/client/task-lists/fills/shipping/index.js @@ -22,7 +22,6 @@ import { import { recordEvent } from '@woocommerce/tracks'; import { registerPlugin } from '@wordpress/plugins'; import { WooOnboardingTask } from '@woocommerce/onboarding'; -import { Text } from '@woocommerce/experimental'; import classNames from 'classnames'; /** @@ -38,6 +37,7 @@ import { ShippingLayoutColumn, ShippingLayoutRow, } from './shipping-providers/partners'; +import { TermsOfService } from '~/task-lists/components/terms-of-service'; export class Shipping extends Component { constructor( props ) { @@ -60,6 +60,8 @@ export class Shipping extends Component { this.storeLocationCompleted = false; this.shippingPartners = props.shippingPartners; + + this.jetpackAuthRedirectUrl = getAdminLink( 'admin.php?page=wc-admin' ); } componentDidMount() { @@ -207,11 +209,6 @@ export class Shipping extends Component { return pluginToPromote.slug; } ); - // Add jetpack to the list if the list includes woocommerce-services - if ( pluginsToActivate.includes( 'woocommerce-services' ) ) { - pluginsToActivate.push( 'jetpack' ); - } - const onShippingPluginInstalltionSkip = () => { recordEvent( 'tasklist_shipping_label_printing', { install: false, @@ -331,29 +328,48 @@ export class Shipping extends Component { 'woocommerce' ), content: ( - { - createNoticesFromResponse( response ); - recordEvent( 'tasklist_shipping_label_printing', { - install: true, - plugins_to_activate: pluginsToActivate, - } ); - this.completeStep(); - } } - onError={ ( errors, response ) => - createNoticesFromResponse( response ) - } - onSkip={ () => { - recordEvent( 'tasklist_shipping_label_printing', { - install: false, - plugins_to_activate: pluginsToActivate, - } ); - invalidateResolutionForStoreSelector(); - getHistory().push( getNewPath( {}, '/', {} ) ); - onComplete(); - } } - pluginSlugs={ pluginsToActivate } - /> + <> + { ! isJetpackConnected && + pluginsToActivate.includes( + 'woocommerce-services' + ) && ( + + ) } + { + createNoticesFromResponse( response ); + recordEvent( + 'tasklist_shipping_label_printing', + { + install: true, + plugins_to_activate: pluginsToActivate, + } + ); + this.completeStep(); + } } + onError={ ( errors, response ) => + createNoticesFromResponse( response ) + } + onSkip={ () => { + recordEvent( + 'tasklist_shipping_label_printing', + { + install: false, + plugins_to_activate: pluginsToActivate, + } + ); + invalidateResolutionForStoreSelector(); + getHistory().push( getNewPath( {}, '/', {} ) ); + onComplete(); + } } + pluginSlugs={ pluginsToActivate } + /> + ), visible: pluginsToActivate.length, }, @@ -368,9 +384,7 @@ export class Shipping extends Component { ), content: ( { recordEvent( 'tasklist_shipping_connect_store' ); @@ -383,17 +397,6 @@ export class Shipping extends Component { // Override the step fields for the smart shipping defaults. if ( this.shippingSmartDefaultsEnabled ) { - const agreementText = pluginsToActivate.includes( - 'woocommerce-services' - ) - ? __( - 'By installing Jetpack and WooCommerce Shipping you agree to the {{link}}Terms of Service{{/link}}.', - 'woocommerce' - ) - : __( - 'By installing Jetpack you agree to the {{link}}Terms of Service{{/link}}.', - 'woocommerce' - ); const shippingSmartDefaultsSteps = { rates: { label: __( 'Review your shipping options', 'woocommerce' ), @@ -538,30 +541,48 @@ export class Shipping extends Component { ) } { pluginsToPromote.length === 1 && pluginsToPromote[ 0 ].slug ? ( - { - createNoticesFromResponse( response ); - recordEvent( - 'tasklist_shipping_label_printing', - { - install: true, - plugins_to_activate: - pluginsToActivate, - } - ); - invalidateResolutionForStoreSelector(); - this.completeStep(); - } } - onError={ ( errors, response ) => - createNoticesFromResponse( response ) - } - onSkip={ onShippingPluginInstalltionSkip } - pluginSlugs={ pluginsToActivate } - installText={ __( - 'Install and enable', - 'woocommerce' - ) } - /> + <> + { ! isJetpackConnected && + pluginsToPromote[ 0 ].slug === + 'woocommerce-services' && ( + + ) } + { + createNoticesFromResponse( + response + ); + recordEvent( + 'tasklist_shipping_label_printing', + { + install: true, + plugins_to_activate: + pluginsToActivate, + } + ); + invalidateResolutionForStoreSelector(); + this.completeStep(); + } } + onError={ ( errors, response ) => + createNoticesFromResponse( + response + ) + } + onSkip={ + onShippingPluginInstalltionSkip + } + pluginSlugs={ pluginsToActivate } + installText={ __( + 'Install and enable', + 'woocommerce' + ) } + /> + ) : ( diff --git a/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/tax.js b/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/tax.js index 6bab840e9fe..d624aac0380 100644 --- a/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/tax.js +++ b/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-headers/tax.js @@ -22,7 +22,7 @@ const TaxHeader = ( { task, goToTask } ) => {

{ __( 'Add your tax rates', 'woocommerce' ) }

{ __( - 'Set up tax rates manually or use WooCommerce and Jetpack to automate your sales tax calculations for you.', + 'Set up tax rates manually or use WooCommerce Tax to automate your sales tax calculations for you.', 'woocommerce' ) }

diff --git a/plugins/woocommerce-admin/client/task-lists/task-lists.scss b/plugins/woocommerce-admin/client/task-lists/task-lists.scss index 3b854e66de3..07941114820 100644 --- a/plugins/woocommerce-admin/client/task-lists/task-lists.scss +++ b/plugins/woocommerce-admin/client/task-lists/task-lists.scss @@ -238,6 +238,10 @@ margin-top: $gap; } +.woocommerce-task-dashboard__container .woocommerce-task__caption.is-tos { + margin-bottom: $gap; +} + .woocommerce-task-list__setup { .woocommerce-experimental-list .woocommerce-experimental-list__item.complete { diff --git a/plugins/woocommerce-admin/docs/features/onboarding.md b/plugins/woocommerce-admin/docs/features/onboarding.md index ed6cd6e7b07..c402e3ba0af 100644 --- a/plugins/woocommerce-admin/docs/features/onboarding.md +++ b/plugins/woocommerce-admin/docs/features/onboarding.md @@ -72,20 +72,20 @@ Both of these endpoints use WooCommerce Core's `WC_Helper_API` directly. The mai To disconnect from WooCommerce.com, go to `WooCommerce > Extensions > WooCommerce.com Subscriptions > Connected to WooCommerce.com > Disconnect`. -## Jetpack Connection +## WordPress.com Connection -Using Jetpack & WooCommerce Shipping & Tax allows us to offer additional features to new WooCommerce users as well as simplify parts of the setup process. For example, we can do automated tax calculations for certain countries, significantly simplifying the tax task. To make this work, the user needs to be connected to a WordPress.com account. This also means development and testing of these features needs to be done on a Jetpack connected site. Search the MGS & the Field Guide for additional resources on testing Jetpack with local setups. +Using a WordPress.com connection in WooCommerce Shipping & Tax allows us to offer additional features to new WooCommerce users as well as simplify parts of the setup process. For example, we can do automated tax calculations for certain countries, significantly simplifying the tax task. To make this work, the user needs to be connected to a WordPress.com account. This also means development and testing of these features needs to be done on a WPCOM connected site. Search the MGS & the Field Guide for additional resources on testing WordPress.com with local setups. -We have a special Jetpack connection flow designed specifically for WooCommerce onboarding, so that the user feels that they are connecting as part of a cohesive experience. To access this flow, we have a custom Jetpack connection endpoint [/wc-admin/plugins/connect-jetpack](https://github.com/woocommerce/woocommerce/blob/feba6a8dcd55d4f5c7edc05478369c76df082293/plugins/woocommerce/src/Admin/API/Plugins.php#L395-L417). +We have a special WordPress.com connection flow designed specifically for WooCommerce onboarding, so that the user feels that they are connecting as part of a cohesive experience. To access this flow, we use the [/wc-admin/onboarding/plugins/jetpack-authorization-url](https://github.com/woocommerce/woocommerce/blob/1a9c1f93b942f682b6561b5cd1ae58f6d5eea49c/plugins/woocommerce/src/Admin/API/OnboardingPlugins.php#L240C2-L274) endpoint. -We use Jetpack's `build_connect_url` function directly, but add the following two query parameters: +We use the Jetpack Connection package's `Manager::get_authorization_url()` function directly, but add the following two query parameters: * `calypso_env`, which allows us to load different versions of Calypso when testing. See the Calypso section below. -* `from=woocommerce-onboarding`, which is used to conditionally show the WooCommerce themed Jetpack authorization process [https://github.com/Automattic/wp-calypso/pull/34380](https://github.com/Automattic/wp-calypso/pull/34380). Without this parameter, you would end up in the normal Jetpack authorization flow. +* `from=woocommerce-services`, which is used to conditionally show the WooCommerce-themed authorization process [https://github.com/Automattic/wp-calypso/pull/35193](https://github.com/Automattic/wp-calypso/pull/35193). Without this parameter, you would end up in the normal Jetpack authorization flow. The user is prompted to install and connect to Jetpack as the first step of the profile wizard. If the user hasn't connected when they arrive at the task list, we also prompt them on certain tasks to make the setup process easier, such as the shipping and tax steps. -To disconnect from Jetpack, go to `Jetpack > Dashboard > Connections > Site connection > Manage site connection > Disconnect`. +To disconnect from WordPress.com, install Jetpack, then go to `Jetpack > Dashboard > Connections > Site connection > Manage site connection > Disconnect`. You can remove Jetpack after you disconnect. ## Calypso diff --git a/plugins/woocommerce-admin/webpack.config.js b/plugins/woocommerce-admin/webpack.config.js index 699a2be622b..18e1e098a16 100644 --- a/plugins/woocommerce-admin/webpack.config.js +++ b/plugins/woocommerce-admin/webpack.config.js @@ -10,6 +10,8 @@ const BundleAnalyzerPlugin = const MomentTimezoneDataPlugin = require( 'moment-timezone-data-webpack-plugin' ); const ForkTsCheckerWebpackPlugin = require( 'fork-ts-checker-webpack-plugin' ); const ReactRefreshWebpackPlugin = require( '@pmmmwh/react-refresh-webpack-plugin' ); +const NormalModuleReplacementPlugin = + require( 'webpack' ).NormalModuleReplacementPlugin; /** * Internal dependencies @@ -168,6 +170,14 @@ const webpackConfig = { }, }, plugins: [ + // Workaround for Gutenberg private API consent string differences between WP 6.3 and 6.4+ + // The modified version checks for the WP version and replaces the consent string with the correct one. + // This can be removed once we drop support for WP 6.3 in the "Customize Your Store" task. + // See this PR for details: https://github.com/woocommerce/woocommerce/pull/40884 + new NormalModuleReplacementPlugin( + /@wordpress\/edit-site\/build-module\/lock-unlock\.js/, + path.resolve( __dirname, 'bin/modified-editsite-lock-unlock.js' ) + ), ...styleConfig.plugins, // Runs TypeScript type checker on a separate process. ! process.env.STORYBOOK && new ForkTsCheckerWebpackPlugin(), diff --git a/plugins/woocommerce/changelog/39948-patch-4 b/plugins/woocommerce/changelog/39948-patch-4 deleted file mode 100644 index 2b48d2bf62e..00000000000 --- a/plugins/woocommerce/changelog/39948-patch-4 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Do not remove sale date from when the sale is still active diff --git a/plugins/woocommerce/changelog/40948-fix-cart-checkout-detection b/plugins/woocommerce/changelog/40948-fix-cart-checkout-detection new file mode 100644 index 00000000000..1ed262abee9 --- /dev/null +++ b/plugins/woocommerce/changelog/40948-fix-cart-checkout-detection @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix detection of cart and checkout classic-shortcode blocks in the system status report. \ No newline at end of file diff --git a/plugins/woocommerce/changelog/FIX_DEPRECATION_STRTOTIME_NULL_PHP_8 b/plugins/woocommerce/changelog/FIX_DEPRECATION_STRTOTIME_NULL_PHP_8 deleted file mode 100644 index a43398706f7..00000000000 --- a/plugins/woocommerce/changelog/FIX_DEPRECATION_STRTOTIME_NULL_PHP_8 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix deprecation Passing null to parameter #1 ($datetime) of type string is deprecated diff --git a/plugins/woocommerce/changelog/add-35142 b/plugins/woocommerce/changelog/add-35142 deleted file mode 100644 index 423c9f8de8c..00000000000 --- a/plugins/woocommerce/changelog/add-35142 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Register product downloads block diff --git a/plugins/woocommerce/changelog/add-35145 b/plugins/woocommerce/changelog/add-35145 deleted file mode 100644 index 093b27a58f8..00000000000 --- a/plugins/woocommerce/changelog/add-35145 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add virtual section and block to the Shipping tab diff --git a/plugins/woocommerce/changelog/add-40042_default_price b/plugins/woocommerce/changelog/add-40042_default_price deleted file mode 100644 index e02e4592779..00000000000 --- a/plugins/woocommerce/changelog/add-40042_default_price +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add support for default values when generating variations in data store and REST API. diff --git a/plugins/woocommerce/changelog/add-40070_global_attribute_terms_filtering b/plugins/woocommerce/changelog/add-40070_global_attribute_terms_filtering deleted file mode 100644 index 6de9f237076..00000000000 --- a/plugins/woocommerce/changelog/add-40070_global_attribute_terms_filtering +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add attributes filter to variations endpoint and deprecate local_attributes filter. diff --git a/plugins/woocommerce/changelog/add-40200 b/plugins/woocommerce/changelog/add-40200 deleted file mode 100644 index 1c0a342bc63..00000000000 --- a/plugins/woocommerce/changelog/add-40200 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add description to Variation options and Variations sections diff --git a/plugins/woocommerce/changelog/add-40248 b/plugins/woocommerce/changelog/add-40248 deleted file mode 100644 index 13d66360d96..00000000000 --- a/plugins/woocommerce/changelog/add-40248 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: add - -Add product page skeleton to product and variation pages diff --git a/plugins/woocommerce/changelog/add-40328-intro-page-when-task-not-completed-but-content-changed b/plugins/woocommerce/changelog/add-40328-intro-page-when-task-not-completed-but-content-changed deleted file mode 100644 index c27430463ab..00000000000 --- a/plugins/woocommerce/changelog/add-40328-intro-page-when-task-not-completed-but-content-changed +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -This PR displays a warning modal when the `Design with A.I` button is clicked, but the `Customize Your Store` task has not been completed, and the active theme has modifications. \ No newline at end of file diff --git a/plugins/woocommerce/changelog/add-40493 b/plugins/woocommerce/changelog/add-40493 deleted file mode 100644 index 6caa28712aa..00000000000 --- a/plugins/woocommerce/changelog/add-40493 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add support for digital product when product-virtual-downloadable feature is enabled diff --git a/plugins/woocommerce/changelog/add-40573_product_variation_edit_page b/plugins/woocommerce/changelog/add-40573_product_variation_edit_page deleted file mode 100644 index 1fb5dfa882b..00000000000 --- a/plugins/woocommerce/changelog/add-40573_product_variation_edit_page +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add new product variation edit page and remove some unused product related components. diff --git a/plugins/woocommerce/changelog/add-40573_product_variation_edit_page_template b/plugins/woocommerce/changelog/add-40573_product_variation_edit_page_template deleted file mode 100644 index e9df5eec360..00000000000 --- a/plugins/woocommerce/changelog/add-40573_product_variation_edit_page_template +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add new ProductVariationTemplate class and exposed it in the product editor settings, also enabled rest api for product variations. diff --git a/plugins/woocommerce/changelog/add-40591_variation_switching b/plugins/woocommerce/changelog/add-40591_variation_switching deleted file mode 100644 index 7658042f646..00000000000 --- a/plugins/woocommerce/changelog/add-40591_variation_switching +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Move product page footer from editor to product page, and update useIsScrolled hook. diff --git a/plugins/woocommerce/changelog/add-40592 b/plugins/woocommerce/changelog/add-40592 deleted file mode 100644 index 459a2652325..00000000000 --- a/plugins/woocommerce/changelog/add-40592 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Register image and visibility blocks into ProductVariationTemplate diff --git a/plugins/woocommerce/changelog/add-40593_pricing_tab_for_variations b/plugins/woocommerce/changelog/add-40593_pricing_tab_for_variations deleted file mode 100644 index 849a299e2b8..00000000000 --- a/plugins/woocommerce/changelog/add-40593_pricing_tab_for_variations +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update variation API to adhere tax class to context, and updated variation template to use tax class field. diff --git a/plugins/woocommerce/changelog/add-40594 b/plugins/woocommerce/changelog/add-40594 deleted file mode 100644 index bf929803a72..00000000000 --- a/plugins/woocommerce/changelog/add-40594 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Register the inventory section for product variation template diff --git a/plugins/woocommerce/changelog/add-40595 b/plugins/woocommerce/changelog/add-40595 deleted file mode 100644 index 671910d3e28..00000000000 --- a/plugins/woocommerce/changelog/add-40595 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Register the shipping section for product variation template diff --git a/plugins/woocommerce/changelog/add-40598 b/plugins/woocommerce/changelog/add-40598 deleted file mode 100644 index c9d7509f84c..00000000000 --- a/plugins/woocommerce/changelog/add-40598 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add Delete variation item to the editor actions menu diff --git a/plugins/woocommerce/changelog/add-40708 b/plugins/woocommerce/changelog/add-40708 deleted file mode 100644 index 3ab24f855d4..00000000000 --- a/plugins/woocommerce/changelog/add-40708 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Fix block registration and variation styles conflicts diff --git a/plugins/woocommerce/changelog/add-40794-active-theme-label b/plugins/woocommerce/changelog/add-40794-active-theme-label deleted file mode 100644 index f4a962b357c..00000000000 --- a/plugins/woocommerce/changelog/add-40794-active-theme-label +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Add active theme label for CYS intro screen diff --git a/plugins/woocommerce/changelog/add-40804 b/plugins/woocommerce/changelog/add-40804 deleted file mode 100644 index ed9787b3f1a..00000000000 --- a/plugins/woocommerce/changelog/add-40804 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Register the downloads block into the ProductVariationTemplate diff --git a/plugins/woocommerce/changelog/add-40805 b/plugins/woocommerce/changelog/add-40805 deleted file mode 100644 index 7d3cba7e17f..00000000000 --- a/plugins/woocommerce/changelog/add-40805 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add virtual section to the product variation template diff --git a/plugins/woocommerce/changelog/add-40872 b/plugins/woocommerce/changelog/add-40872 deleted file mode 100644 index 9f16f4b3328..00000000000 --- a/plugins/woocommerce/changelog/add-40872 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Create product-external-affiliate feature flag diff --git a/plugins/woocommerce/changelog/add-assemble-site b/plugins/woocommerce/changelog/add-assemble-site deleted file mode 100644 index 8dbeafa1b67..00000000000 --- a/plugins/woocommerce/changelog/add-assemble-site +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Persist CYS AI assembled site diff --git a/plugins/woocommerce/changelog/add-call-wc-store-patterns-api b/plugins/woocommerce/changelog/add-call-wc-store-patterns-api deleted file mode 100644 index 203c246ba80..00000000000 --- a/plugins/woocommerce/changelog/add-call-wc-store-patterns-api +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Call wc store patterns API to update patterns for CYS diff --git a/plugins/woocommerce/changelog/add-cys-ai-header-footer b/plugins/woocommerce/changelog/add-cys-ai-header-footer deleted file mode 100644 index 4667721b860..00000000000 --- a/plugins/woocommerce/changelog/add-cys-ai-header-footer +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add cys ai header/footer diff --git a/plugins/woocommerce/changelog/add-cys-ai-save-options b/plugins/woocommerce/changelog/add-cys-ai-save-options deleted file mode 100644 index 823971e6b24..00000000000 --- a/plugins/woocommerce/changelog/add-cys-ai-save-options +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Save CYS AI wizard response to options diff --git a/plugins/woocommerce/changelog/add-cys-ai-select-color-palettes b/plugins/woocommerce/changelog/add-cys-ai-select-color-palettes deleted file mode 100644 index c50bde02695..00000000000 --- a/plugins/woocommerce/changelog/add-cys-ai-select-color-palettes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Use CYS AI suggestions to populate the color schemes in assembler hub color palette selection diff --git a/plugins/woocommerce/changelog/add-cys-existing-ai-theme b/plugins/woocommerce/changelog/add-cys-existing-ai-theme deleted file mode 100644 index b4b6231d807..00000000000 --- a/plugins/woocommerce/changelog/add-cys-existing-ai-theme +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Save ai generated theme ID to options and use it to determine if the intro page should warn about existing AI theme diff --git a/plugins/woocommerce/changelog/add-cys-homepage-template-completion b/plugins/woocommerce/changelog/add-cys-homepage-template-completion deleted file mode 100644 index ba920254742..00000000000 --- a/plugins/woocommerce/changelog/add-cys-homepage-template-completion +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add homepage template AI completion and revamped header footer diff --git a/plugins/woocommerce/changelog/add-cys-intro-tracks b/plugins/woocommerce/changelog/add-cys-intro-tracks deleted file mode 100644 index dc5b5b42af9..00000000000 --- a/plugins/woocommerce/changelog/add-cys-intro-tracks +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add tracks to cys intro page diff --git a/plugins/woocommerce/changelog/add-cys-swtich-theme-tt3 b/plugins/woocommerce/changelog/add-cys-swtich-theme-tt3 deleted file mode 100644 index 93ad71b210b..00000000000 --- a/plugins/woocommerce/changelog/add-cys-swtich-theme-tt3 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Switch theme to TT3 during cys loading screen diff --git a/plugins/woocommerce/changelog/add-cys-update-the-templates-list b/plugins/woocommerce/changelog/add-cys-update-the-templates-list deleted file mode 100644 index b465f3fed8e..00000000000 --- a/plugins/woocommerce/changelog/add-cys-update-the-templates-list +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update the homepage templates list for the patterns assembler. diff --git a/plugins/woocommerce/changelog/add-doc-naming-conventions b/plugins/woocommerce/changelog/add-doc-naming-conventions deleted file mode 100644 index 77ee9da0b9e..00000000000 --- a/plugins/woocommerce/changelog/add-doc-naming-conventions +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Migrate naming conventions documentation. diff --git a/plugins/woocommerce/changelog/add-docs-manifest b/plugins/woocommerce/changelog/add-docs-manifest deleted file mode 100644 index c0c81204fbb..00000000000 --- a/plugins/woocommerce/changelog/add-docs-manifest +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: dev -Comment: Adds documentation manifest. This has no functional bearing on the product, and may anyway be adjusted over time. - - diff --git a/plugins/woocommerce/changelog/add-expose-block-id-and-order b/plugins/woocommerce/changelog/add-expose-block-id-and-order deleted file mode 100644 index 56824e61797..00000000000 --- a/plugins/woocommerce/changelog/add-expose-block-id-and-order +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Include template block ID and block order in formatted block template so they are available to the client. diff --git a/plugins/woocommerce/changelog/add-input-field b/plugins/woocommerce/changelog/add-input-field deleted file mode 100644 index 2fa35121d8f..00000000000 --- a/plugins/woocommerce/changelog/add-input-field +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add woocommerce/product-text-field block diff --git a/plugins/woocommerce/changelog/add-number-block b/plugins/woocommerce/changelog/add-number-block deleted file mode 100644 index d958ae475f9..00000000000 --- a/plugins/woocommerce/changelog/add-number-block +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add 'woocommerce/product-number-field' block diff --git a/plugins/woocommerce/changelog/add-onboarding-theme-rest-api-endpoint-stub b/plugins/woocommerce/changelog/add-onboarding-theme-rest-api-endpoint-stub deleted file mode 100644 index 87ebb6b62c1..00000000000 --- a/plugins/woocommerce/changelog/add-onboarding-theme-rest-api-endpoint-stub +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add recommended Themes REST API Endpoint Stub diff --git a/plugins/woocommerce/changelog/add-product-editor-block-render-e2e-test b/plugins/woocommerce/changelog/add-product-editor-block-render-e2e-test deleted file mode 100644 index 31e144483cc..00000000000 --- a/plugins/woocommerce/changelog/add-product-editor-block-render-e2e-test +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add new E2E test for the product editor to check if all blocks render correctly. diff --git a/plugins/woocommerce/changelog/add-script-strategy b/plugins/woocommerce/changelog/add-script-strategy deleted file mode 100644 index 7ee37500dc3..00000000000 --- a/plugins/woocommerce/changelog/add-script-strategy +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Use the Script API strategy feature to defer front-end scripts in WordPress 6.3+ \ No newline at end of file diff --git a/plugins/woocommerce/changelog/add-template-api-conditional-visibility b/plugins/woocommerce/changelog/add-template-api-conditional-visibility deleted file mode 100644 index 5b25571edb1..00000000000 --- a/plugins/woocommerce/changelog/add-template-api-conditional-visibility +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add conditional visibilty support to the Block Template API. diff --git a/plugins/woocommerce/changelog/add-template-api-readmes b/plugins/woocommerce/changelog/add-template-api-readmes deleted file mode 100644 index a3d87cd8135..00000000000 --- a/plugins/woocommerce/changelog/add-template-api-readmes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Documentation for block templates and product editor templates. diff --git a/plugins/woocommerce/changelog/add-unit-tests b/plugins/woocommerce/changelog/add-unit-tests deleted file mode 100644 index ed38db4dae9..00000000000 --- a/plugins/woocommerce/changelog/add-unit-tests +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: Adds unit tests, no functionality is modified. - - diff --git a/plugins/woocommerce/changelog/add-wccom-18213-marketplace-view-more-button b/plugins/woocommerce/changelog/add-wccom-18213-marketplace-view-more-button deleted file mode 100644 index 52100abe298..00000000000 --- a/plugins/woocommerce/changelog/add-wccom-18213-marketplace-view-more-button +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: enhancement -Comment: Add Themes to the Extensions catalogue for easy download and installation. - diff --git a/plugins/woocommerce/changelog/add-wccom-18292-cache-marketplace-results b/plugins/woocommerce/changelog/add-wccom-18292-cache-marketplace-results deleted file mode 100644 index 4e7330f84c4..00000000000 --- a/plugins/woocommerce/changelog/add-wccom-18292-cache-marketplace-results +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: performance -Comment: Memory-cache In-App Marketplace search, browse, and category API hits, for performance. - diff --git a/plugins/woocommerce/changelog/api-minor-fixes-for-api-daily-flakiness b/plugins/woocommerce/changelog/api-minor-fixes-for-api-daily-flakiness deleted file mode 100644 index 12666be9d4d..00000000000 --- a/plugins/woocommerce/changelog/api-minor-fixes-for-api-daily-flakiness +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -A few fixes for API daily test flakiness diff --git a/plugins/woocommerce/changelog/breadcrumb-accessibility b/plugins/woocommerce/changelog/breadcrumb-accessibility deleted file mode 100644 index 9a0ef664c07..00000000000 --- a/plugins/woocommerce/changelog/breadcrumb-accessibility +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Added aria-label to breadcrumb element diff --git a/plugins/woocommerce/changelog/dev-40130_remove_feeling_stuck_tooltip b/plugins/woocommerce/changelog/dev-40130_remove_feeling_stuck_tooltip deleted file mode 100644 index c1499e51e2a..00000000000 --- a/plugins/woocommerce/changelog/dev-40130_remove_feeling_stuck_tooltip +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Remove "Feeling Stuck" tooltip #40397 diff --git a/plugins/woocommerce/changelog/dev-40590_change_header_to_support_variation b/plugins/woocommerce/changelog/dev-40590_change_header_to_support_variation deleted file mode 100644 index cc38d9fb810..00000000000 --- a/plugins/woocommerce/changelog/dev-40590_change_header_to_support_variation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Change the blocks editor header to support variations #40606 diff --git a/plugins/woocommerce/changelog/dev-40597_display_notice_at_top_single_variation b/plugins/woocommerce/changelog/dev-40597_display_notice_at_top_single_variation deleted file mode 100644 index 76ae1870553..00000000000 --- a/plugins/woocommerce/changelog/dev-40597_display_notice_at_top_single_variation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: dev - -Add Product Editor Helper and single variations notice diff --git a/plugins/woocommerce/changelog/dev-ci-release-fix-api-wp-latest b/plugins/woocommerce/changelog/dev-ci-release-fix-api-wp-latest deleted file mode 100644 index d633c83edf6..00000000000 --- a/plugins/woocommerce/changelog/dev-ci-release-fix-api-wp-latest +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Fix "API on WP Latest" job in "Smoke test release" workflow. diff --git a/plugins/woocommerce/changelog/dev-release-test-wooaf-drafts b/plugins/woocommerce/changelog/dev-release-test-wooaf-drafts deleted file mode 100644 index c9a77118b85..00000000000 --- a/plugins/woocommerce/changelog/dev-release-test-wooaf-drafts +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Update release test workflow to support release drafts. diff --git a/plugins/woocommerce/changelog/doc-handbook-1.1 b/plugins/woocommerce/changelog/doc-handbook-1.1 deleted file mode 100644 index 676960fb9d5..00000000000 --- a/plugins/woocommerce/changelog/doc-handbook-1.1 +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: dev -Comment: Add reference to product editor handbook - - diff --git a/plugins/woocommerce/changelog/docs-implementing-wc-integration b/plugins/woocommerce/changelog/docs-implementing-wc-integration deleted file mode 100644 index 6e12e3136c9..00000000000 --- a/plugins/woocommerce/changelog/docs-implementing-wc-integration +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: tweak - -Add documentation for implementing settings for extensions diff --git a/plugins/woocommerce/changelog/docs-migrate-core-critical-flows-from-wiki b/plugins/woocommerce/changelog/docs-migrate-core-critical-flows-from-wiki deleted file mode 100644 index 68e933f0a27..00000000000 --- a/plugins/woocommerce/changelog/docs-migrate-core-critical-flows-from-wiki +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Comment: migrate core flows from wiki to docs within repo diff --git a/plugins/woocommerce/changelog/docs-migrate-testing-instructions-from-wiki b/plugins/woocommerce/changelog/docs-migrate-testing-instructions-from-wiki deleted file mode 100644 index 24d3dd377ec..00000000000 --- a/plugins/woocommerce/changelog/docs-migrate-testing-instructions-from-wiki +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Comment: Migrated testing instructions doc from wiki diff --git a/plugins/woocommerce/changelog/docs-woocommerce-endpoints b/plugins/woocommerce/changelog/docs-woocommerce-endpoints deleted file mode 100644 index 5ddf388856c..00000000000 --- a/plugins/woocommerce/changelog/docs-woocommerce-endpoints +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: tweak - -Add documentation for WooCommerce endpoints diff --git a/plugins/woocommerce/changelog/e2e-add-order-notes b/plugins/woocommerce/changelog/e2e-add-order-notes deleted file mode 100644 index f9ce55740a9..00000000000 --- a/plugins/woocommerce/changelog/e2e-add-order-notes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Add e2e test for order notes diff --git a/plugins/woocommerce/changelog/e2e-add-shopper-tags-attributes b/plugins/woocommerce/changelog/e2e-add-shopper-tags-attributes deleted file mode 100644 index e905225a137..00000000000 --- a/plugins/woocommerce/changelog/e2e-add-shopper-tags-attributes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Adds tests to check for the product tags and attributes diff --git a/plugins/woocommerce/changelog/e2e-add-test-shopper-mini-cart b/plugins/woocommerce/changelog/e2e-add-test-shopper-mini-cart deleted file mode 100644 index 14cbec609f8..00000000000 --- a/plugins/woocommerce/changelog/e2e-add-test-shopper-mini-cart +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Adds tests to cover shopper and mini cart flows diff --git a/plugins/woocommerce/changelog/e2e-bulk-update-order-status b/plugins/woocommerce/changelog/e2e-bulk-update-order-status deleted file mode 100644 index be7672d0b57..00000000000 --- a/plugins/woocommerce/changelog/e2e-bulk-update-order-status +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Add e2e test to bulk update order statuses diff --git a/plugins/woocommerce/changelog/e2e-enable-dotfiles-e2e-runs b/plugins/woocommerce/changelog/e2e-enable-dotfiles-e2e-runs deleted file mode 100644 index 303bdddad97..00000000000 --- a/plugins/woocommerce/changelog/e2e-enable-dotfiles-e2e-runs +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Allow e2e tests to use dotfiles for configuration (including documentation update) diff --git a/plugins/woocommerce/changelog/e2e-ensure-HPOS-is-disabled-when-required b/plugins/woocommerce/changelog/e2e-ensure-HPOS-is-disabled-when-required deleted file mode 100644 index d1e949dc35c..00000000000 --- a/plugins/woocommerce/changelog/e2e-ensure-HPOS-is-disabled-when-required +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Ensure HPOS is disabled when ENABLE_HPOS is undefined or set to '0' diff --git a/plugins/woocommerce/changelog/e2e-fix-for-flaky-page-load b/plugins/woocommerce/changelog/e2e-fix-for-flaky-page-load deleted file mode 100644 index f9ec282c35c..00000000000 --- a/plugins/woocommerce/changelog/e2e-fix-for-flaky-page-load +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Fix for occasionally flaky page load test diff --git a/plugins/woocommerce/changelog/e2e-remove-obw-tests b/plugins/woocommerce/changelog/e2e-remove-obw-tests deleted file mode 100644 index 33dbe30fd26..00000000000 --- a/plugins/woocommerce/changelog/e2e-remove-obw-tests +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Removes the onboarding wizard e2e tests (has been replaced by core profiler) diff --git a/plugins/woocommerce/changelog/e2e-temp-fix-for-daily-e2e b/plugins/woocommerce/changelog/e2e-temp-fix-for-daily-e2e deleted file mode 100644 index a7199aab399..00000000000 --- a/plugins/woocommerce/changelog/e2e-temp-fix-for-daily-e2e +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Skip the assembler-hub e2e tests on the daily run diff --git a/plugins/woocommerce/changelog/e2e-update-order-to-cancelled b/plugins/woocommerce/changelog/e2e-update-order-to-cancelled deleted file mode 100644 index d3fc2f1f67c..00000000000 --- a/plugins/woocommerce/changelog/e2e-update-order-to-cancelled +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Update order status to cancelled diff --git a/plugins/woocommerce/changelog/e2e-update-playwright-1_38 b/plugins/woocommerce/changelog/e2e-update-playwright-1_38 deleted file mode 100644 index 3d2dc9d0a68..00000000000 --- a/plugins/woocommerce/changelog/e2e-update-playwright-1_38 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Update Playwright to 1.38 diff --git a/plugins/woocommerce/changelog/feature-marketplace-themes b/plugins/woocommerce/changelog/feature-marketplace-themes deleted file mode 100644 index 0227966e0b4..00000000000 --- a/plugins/woocommerce/changelog/feature-marketplace-themes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: enhancement - -Add Themes to the Extensions catalogue for easy download and installation. \ No newline at end of file diff --git a/plugins/woocommerce/changelog/fix-39626-pending-order-syncs b/plugins/woocommerce/changelog/fix-39626-pending-order-syncs deleted file mode 100644 index 407005b95e2..00000000000 --- a/plugins/woocommerce/changelog/fix-39626-pending-order-syncs +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: enhancement - -Add a background sync that can run independently of the normal real-time HPOS data sync. Also add a button on the Features screen to trigger an order sync manually. diff --git a/plugins/woocommerce/changelog/fix-40319 b/plugins/woocommerce/changelog/fix-40319 deleted file mode 100644 index 6ca2909685e..00000000000 --- a/plugins/woocommerce/changelog/fix-40319 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -fix - Fatal error in class-wc-helper-updater.php when transient parameter is null diff --git a/plugins/woocommerce/changelog/fix-40370 b/plugins/woocommerce/changelog/fix-40370 deleted file mode 100644 index e2f58b08dfa..00000000000 --- a/plugins/woocommerce/changelog/fix-40370 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Remove gray background on product editor page and fix wrong visible scroll diff --git a/plugins/woocommerce/changelog/fix-40510 b/plugins/woocommerce/changelog/fix-40510 deleted file mode 100644 index 99b39ca4861..00000000000 --- a/plugins/woocommerce/changelog/fix-40510 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: enhancement - -Hide "Preview" icon to other users when order is locked for edits. diff --git a/plugins/woocommerce/changelog/fix-40511 b/plugins/woocommerce/changelog/fix-40511 deleted file mode 100644 index 2567ff3357a..00000000000 --- a/plugins/woocommerce/changelog/fix-40511 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Make sure 'woocommerce_update_order' is always triggered even when no changes are made to the order. diff --git a/plugins/woocommerce/changelog/fix-40819-spotlight-tour-styling b/plugins/woocommerce/changelog/fix-40819-spotlight-tour-styling deleted file mode 100644 index 1b553ce2866..00000000000 --- a/plugins/woocommerce/changelog/fix-40819-spotlight-tour-styling +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: tweak - -Remove spotlight tour modal shadow in CYS diff --git a/plugins/woocommerce/changelog/fix-40842_hide_header b/plugins/woocommerce/changelog/fix-40842_hide_header deleted file mode 100644 index c27e0d0126a..00000000000 --- a/plugins/woocommerce/changelog/fix-40842_hide_header +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Disable the rendering of the header on the variation edit page, as it has its own header. diff --git a/plugins/woocommerce/changelog/fix-40852 b/plugins/woocommerce/changelog/fix-40852 deleted file mode 100644 index 7701b1aea43..00000000000 --- a/plugins/woocommerce/changelog/fix-40852 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix duplicate description when editing the product summary diff --git a/plugins/woocommerce/changelog/fix-40875 b/plugins/woocommerce/changelog/fix-40875 deleted file mode 100644 index 50386fb857e..00000000000 --- a/plugins/woocommerce/changelog/fix-40875 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Improve has_price filter so it can matches when the price record does not exist or it's empty/null diff --git a/plugins/woocommerce/changelog/fix-active-theme-has-mods-logic b/plugins/woocommerce/changelog/fix-active-theme-has-mods-logic deleted file mode 100644 index 209ce64fd31..00000000000 --- a/plugins/woocommerce/changelog/fix-active-theme-has-mods-logic +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix customize your store activeThemeHasMods logic diff --git a/plugins/woocommerce/changelog/fix-admin-select2-fallback-colors b/plugins/woocommerce/changelog/fix-admin-select2-fallback-colors deleted file mode 100644 index 9a65f533078..00000000000 --- a/plugins/woocommerce/changelog/fix-admin-select2-fallback-colors +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Use fallback color for select2 fields on non WooCommerce pages. diff --git a/plugins/woocommerce/changelog/fix-ai-generate-images-not-display b/plugins/woocommerce/changelog/fix-ai-generate-images-not-display deleted file mode 100644 index f6904a63b91..00000000000 --- a/plugins/woocommerce/changelog/fix-ai-generate-images-not-display +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -CYS: Fix AI selected verticals not display diff --git a/plugins/woocommerce/changelog/fix-always-set-address-indexes b/plugins/woocommerce/changelog/fix-always-set-address-indexes deleted file mode 100644 index 3294b511960..00000000000 --- a/plugins/woocommerce/changelog/fix-always-set-address-indexes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Always generate address metadata indexes for HPOS orders. diff --git a/plugins/woocommerce/changelog/fix-cart-duplicate-notices b/plugins/woocommerce/changelog/fix-cart-duplicate-notices deleted file mode 100644 index b01b6e6469a..00000000000 --- a/plugins/woocommerce/changelog/fix-cart-duplicate-notices +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fixes the logic responsible for removing duplicate notices from the (classic) cart page. diff --git a/plugins/woocommerce/changelog/fix-ci-branch-matrix b/plugins/woocommerce/changelog/fix-ci-branch-matrix deleted file mode 100644 index 8bced523432..00000000000 --- a/plugins/woocommerce/changelog/fix-ci-branch-matrix +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev -Comment: CI-only change. - diff --git a/plugins/woocommerce/changelog/fix-color-panel-and-nav-links b/plugins/woocommerce/changelog/fix-color-panel-and-nav-links deleted file mode 100644 index bd83580ce22..00000000000 --- a/plugins/woocommerce/changelog/fix-color-panel-and-nav-links +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -CYS: Hide color panel and fix nav links on WooExpress site diff --git a/plugins/woocommerce/changelog/fix-core-editor-store-in-classic b/plugins/woocommerce/changelog/fix-core-editor-store-in-classic deleted file mode 100644 index 3f7d52f6397..00000000000 --- a/plugins/woocommerce/changelog/fix-core-editor-store-in-classic +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix core-editor Redux store available in classic editor diff --git a/plugins/woocommerce/changelog/fix-coupon-error-notice-text b/plugins/woocommerce/changelog/fix-coupon-error-notice-text deleted file mode 100644 index 8102b91d0c2..00000000000 --- a/plugins/woocommerce/changelog/fix-coupon-error-notice-text +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: tweak - -Fixes grammar in coupon error message. diff --git a/plugins/woocommerce/changelog/fix-cys-ai-state-machine b/plugins/woocommerce/changelog/fix-cys-ai-state-machine deleted file mode 100644 index 308a904ad0e..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-ai-state-machine +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix chooseFontPairing state diff --git a/plugins/woocommerce/changelog/fix-cys-assembler-color-palette-persistence b/plugins/woocommerce/changelog/fix-cys-assembler-color-palette-persistence deleted file mode 100644 index 7ab3a9302dd..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-assembler-color-palette-persistence +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -CYS: Fix the bug where sometimes switching from user defined color palettes to a pre-defined color palette won't set some colors. diff --git a/plugins/woocommerce/changelog/fix-cys-assembler-hub-font-jankiness b/plugins/woocommerce/changelog/fix-cys-assembler-hub-font-jankiness deleted file mode 100644 index db7469195a8..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-assembler-hub-font-jankiness +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -CYS: Optimised loading and animation of font variation containers diff --git a/plugins/woocommerce/changelog/fix-cys-design-with-ai-duplicate-color-palette-validation b/plugins/woocommerce/changelog/fix-cys-design-with-ai-duplicate-color-palette-validation deleted file mode 100644 index 7ab3a9302dd..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-design-with-ai-duplicate-color-palette-validation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -CYS: Fix the bug where sometimes switching from user defined color palettes to a pre-defined color palette won't set some colors. diff --git a/plugins/woocommerce/changelog/fix-cys-design-with-ai-loader-loop b/plugins/woocommerce/changelog/fix-cys-design-with-ai-loader-loop deleted file mode 100644 index ca73c914700..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-design-with-ai-loader-loop +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix cys loading screep should not be looping diff --git a/plugins/woocommerce/changelog/fix-cys-font-family-issues b/plugins/woocommerce/changelog/fix-cys-font-family-issues deleted file mode 100644 index fd8ff23c585..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-font-family-issues +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix CYS font not loaded in sidebar panel iframes and incorrect text optimization during google font loading diff --git a/plugins/woocommerce/changelog/fix-cys-intro-parallelise-network-calls b/plugins/woocommerce/changelog/fix-cys-intro-parallelise-network-calls deleted file mode 100644 index 867ab80b68e..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-intro-parallelise-network-calls +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Parallelised the independent network calls on the intro screen so that they become much faster diff --git a/plugins/woocommerce/changelog/fix-cys-opacity-issue b/plugins/woocommerce/changelog/fix-cys-opacity-issue deleted file mode 100644 index 630eb4ca716..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-opacity-issue +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix cys opacity style does not reset after saving diff --git a/plugins/woocommerce/changelog/fix-cys-remove-retry-button-offline b/plugins/woocommerce/changelog/fix-cys-remove-retry-button-offline deleted file mode 100644 index 7f1a5968458..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-remove-retry-button-offline +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Remove retry button and update copy when CYS intro page is working offline diff --git a/plugins/woocommerce/changelog/fix-cys-theme-id-option b/plugins/woocommerce/changelog/fix-cys-theme-id-option deleted file mode 100644 index 4aa2990b92b..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-theme-id-option +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Add woocommerce_admin_customize_store_completed_theme_id option to allowed list diff --git a/plugins/woocommerce/changelog/fix-cys-transitional-page b/plugins/woocommerce/changelog/fix-cys-transitional-page deleted file mode 100644 index 4b494255756..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-transitional-page +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix customize your store site preview in transitional screen diff --git a/plugins/woocommerce/changelog/fix-cys-ui b/plugins/woocommerce/changelog/fix-cys-ui new file mode 100644 index 00000000000..d931c519b82 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-cys-ui @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix CYS assembler hub UI issues diff --git a/plugins/woocommerce/changelog/fix-cys-ui-issues b/plugins/woocommerce/changelog/fix-cys-ui-issues deleted file mode 100644 index 6fbedce4478..00000000000 --- a/plugins/woocommerce/changelog/fix-cys-ui-issues +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix cys UI bugs diff --git a/plugins/woocommerce/changelog/fix-deprecate-sofort b/plugins/woocommerce/changelog/fix-deprecate-sofort deleted file mode 100644 index 3ab652eadb3..00000000000 --- a/plugins/woocommerce/changelog/fix-deprecate-sofort +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Remove references to Sofort in the WooPayments banner diff --git a/plugins/woocommerce/changelog/fix-docblock-type-annotation-process-refund b/plugins/woocommerce/changelog/fix-docblock-type-annotation-process-refund deleted file mode 100644 index 4d66813cb77..00000000000 --- a/plugins/woocommerce/changelog/fix-docblock-type-annotation-process-refund +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: tweak - -Add correct type annotation for the return type of `::process_refund`. diff --git a/plugins/woocommerce/changelog/fix-how-to-prepare-links-link-target b/plugins/woocommerce/changelog/fix-how-to-prepare-links-link-target deleted file mode 100644 index 7e5d92f7d96..00000000000 --- a/plugins/woocommerce/changelog/fix-how-to-prepare-links-link-target +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Added link to blog post which explains best way to handle link diff --git a/plugins/woocommerce/changelog/fix-linting-exceptions b/plugins/woocommerce/changelog/fix-linting-exceptions new file mode 100644 index 00000000000..88de0778b71 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-linting-exceptions @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Not adding a changelog entry here, as there will be no change to the shipped product. Instead, this changes which potential errors are flagged during development. + + diff --git a/plugins/woocommerce/changelog/fix-marketplace-search-feedback b/plugins/woocommerce/changelog/fix-marketplace-search-feedback deleted file mode 100644 index c10a65ccf59..00000000000 --- a/plugins/woocommerce/changelog/fix-marketplace-search-feedback +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix -Comment: In the marketplace show themes first if there are no extensions, empty search will open the discovery page, and large screens will show 8 results if available. - diff --git a/plugins/woocommerce/changelog/fix-marketplace-tab-reset-state b/plugins/woocommerce/changelog/fix-marketplace-tab-reset-state deleted file mode 100644 index e604383632b..00000000000 --- a/plugins/woocommerce/changelog/fix-marketplace-tab-reset-state +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix -Comment: Fix content rendering issues with changing Marketplace tabs. - diff --git a/plugins/woocommerce/changelog/fix-my-dashboard-theme-fixes b/plugins/woocommerce/changelog/fix-my-dashboard-theme-fixes deleted file mode 100644 index fdc716f3733..00000000000 --- a/plugins/woocommerce/changelog/fix-my-dashboard-theme-fixes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix -Comment: Fix Marketplace theme labels and links. - diff --git a/plugins/woocommerce/changelog/fix-order-confirmation-page-styles b/plugins/woocommerce/changelog/fix-order-confirmation-page-styles deleted file mode 100644 index 0c30f2db48b..00000000000 --- a/plugins/woocommerce/changelog/fix-order-confirmation-page-styles +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Fixed styling of list items on the order confirmation page when using a block theme. diff --git a/plugins/woocommerce/changelog/fix-preload-ai-loader-image b/plugins/woocommerce/changelog/fix-preload-ai-loader-image deleted file mode 100644 index dad6b7dd053..00000000000 --- a/plugins/woocommerce/changelog/fix-preload-ai-loader-image +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fix cys flickering image in ai loader diff --git a/plugins/woocommerce/changelog/fix-refactor-use-network-status b/plugins/woocommerce/changelog/fix-refactor-use-network-status deleted file mode 100644 index a207dc5e798..00000000000 --- a/plugins/woocommerce/changelog/fix-refactor-use-network-status +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: tweak - -Refactored network offline detection into its own hook \ No newline at end of file diff --git a/plugins/woocommerce/changelog/fix-refactored-cys-banner b/plugins/woocommerce/changelog/fix-refactored-cys-banner deleted file mode 100644 index 7f278cd6d15..00000000000 --- a/plugins/woocommerce/changelog/fix-refactored-cys-banner +++ /dev/null @@ -1,7 +0,0 @@ -Significance: patch -Type: fix - -Comment: Refactored CYS Intro banner and added tests - - - diff --git a/plugins/woocommerce/changelog/fix-remove_extra_quotes_in_block_editor_template b/plugins/woocommerce/changelog/fix-remove_extra_quotes_in_block_editor_template deleted file mode 100644 index f8ab858e1d9..00000000000 --- a/plugins/woocommerce/changelog/fix-remove_extra_quotes_in_block_editor_template +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Remove extra quotes in block editor template #40490 diff --git a/plugins/woocommerce/changelog/fix-setup-tasklist-is-considered-as-hidden b/plugins/woocommerce/changelog/fix-setup-tasklist-is-considered-as-hidden deleted file mode 100644 index fc6c9daff46..00000000000 --- a/plugins/woocommerce/changelog/fix-setup-tasklist-is-considered-as-hidden +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Remove unnecessary APIs calls when the setup tasklist is shown diff --git a/plugins/woocommerce/changelog/fix-stalebot-excl-enhancement b/plugins/woocommerce/changelog/fix-stalebot-excl-enhancement deleted file mode 100644 index 6cc37d331b3..00000000000 --- a/plugins/woocommerce/changelog/fix-stalebot-excl-enhancement +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -add enhancement exclusion to stalebot config diff --git a/plugins/woocommerce/changelog/fix-wccom-18033-reset-search-when-tab-changes b/plugins/woocommerce/changelog/fix-wccom-18033-reset-search-when-tab-changes deleted file mode 100644 index 40f039772fd..00000000000 --- a/plugins/woocommerce/changelog/fix-wccom-18033-reset-search-when-tab-changes +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fix -Comment: Reset search input when switching between tabs in the marketplace page - - diff --git a/plugins/woocommerce/changelog/fix-wccom-18034-modern-skeleton-loaders b/plugins/woocommerce/changelog/fix-wccom-18034-modern-skeleton-loaders deleted file mode 100644 index da6ff1e1a67..00000000000 --- a/plugins/woocommerce/changelog/fix-wccom-18034-modern-skeleton-loaders +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update -Comment: Improved loading indicators on WooCommerce > Extensions so they more-accurately reflect the layout of the content that will replace them. - diff --git a/plugins/woocommerce/changelog/fix-wccom-18179-search-box-border b/plugins/woocommerce/changelog/fix-wccom-18179-search-box-border deleted file mode 100644 index 5b89c17f125..00000000000 --- a/plugins/woocommerce/changelog/fix-wccom-18179-search-box-border +++ /dev/null @@ -1,6 +0,0 @@ -Significance: patch -Type: fix -Comment: Prevented a 1.5px cosmetic shift of contents in the Extension Search box when focussing/unfocussing. - - - diff --git a/plugins/woocommerce/changelog/fix-wccom-18329-unvisible-header b/plugins/woocommerce/changelog/fix-wccom-18329-unvisible-header deleted file mode 100644 index b3bacb9fd89..00000000000 --- a/plugins/woocommerce/changelog/fix-wccom-18329-unvisible-header +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix -Comment: Fix the Marketplace header being invisible after viewing other WC Admin pages. - diff --git a/plugins/woocommerce/changelog/fix-wcpay-7119-payments-task-completed-after-onboarding b/plugins/woocommerce/changelog/fix-wcpay-7119-payments-task-completed-after-onboarding deleted file mode 100644 index 85b48bee7a8..00000000000 --- a/plugins/woocommerce/changelog/fix-wcpay-7119-payments-task-completed-after-onboarding +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Mark Set up WooPayments task completed only after onboarding is complete diff --git a/plugins/woocommerce/changelog/follow-up-remove-obw-e2e b/plugins/woocommerce/changelog/follow-up-remove-obw-e2e deleted file mode 100644 index c72a6579bbb..00000000000 --- a/plugins/woocommerce/changelog/follow-up-remove-obw-e2e +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Remove onboarding.js file no longer used in e2e tests diff --git a/plugins/woocommerce/changelog/issues-30778-wc_get_products_by_category_ID b/plugins/woocommerce/changelog/issues-30778-wc_get_products_by_category_ID deleted file mode 100644 index f83904d1667..00000000000 --- a/plugins/woocommerce/changelog/issues-30778-wc_get_products_by_category_ID +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Support using category_id and tag_id in wc_get_product() \ No newline at end of file diff --git a/plugins/woocommerce/changelog/pr-35743 b/plugins/woocommerce/changelog/pr-35743 deleted file mode 100644 index 217aa519b84..00000000000 --- a/plugins/woocommerce/changelog/pr-35743 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Modify the possibly_schedule_import function to return the order id \ No newline at end of file diff --git a/plugins/woocommerce/changelog/pr-40275 b/plugins/woocommerce/changelog/pr-40275 deleted file mode 100644 index 059d3898b13..00000000000 --- a/plugins/woocommerce/changelog/pr-40275 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: enhancement - -Add order instance and redirect URL arguments to woocommerce_get_cancel_order_url and woocommerce_get_cancel_order_url_raw filters diff --git a/plugins/woocommerce/changelog/pr-40424 b/plugins/woocommerce/changelog/pr-40424 deleted file mode 100644 index ac28bdc8b32..00000000000 --- a/plugins/woocommerce/changelog/pr-40424 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Rename the Venezuelan currency from Bolivar soberano to just Bolivar \ No newline at end of file diff --git a/plugins/woocommerce/changelog/pr-40535 b/plugins/woocommerce/changelog/pr-40535 deleted file mode 100644 index 9f3035c1ff5..00000000000 --- a/plugins/woocommerce/changelog/pr-40535 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add notices about the removal of the Legacy API in WooCommerce 9.0 \ No newline at end of file diff --git a/plugins/woocommerce/changelog/pr-40771 b/plugins/woocommerce/changelog/pr-40771 deleted file mode 100644 index a118368e5ac..00000000000 --- a/plugins/woocommerce/changelog/pr-40771 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: tweak - -Add documentation for useful core functions \ No newline at end of file diff --git a/plugins/woocommerce/changelog/pr-40866 b/plugins/woocommerce/changelog/pr-40866 deleted file mode 100644 index 63430010f52..00000000000 --- a/plugins/woocommerce/changelog/pr-40866 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: add - -Add notices about the webhooks using legacy REST API payload going unsupported in WooCommerce 9.0 \ No newline at end of file diff --git a/plugins/woocommerce/changelog/refactor-unit-test-workflow b/plugins/woocommerce/changelog/refactor-unit-test-workflow deleted file mode 100644 index c37373fdecf..00000000000 --- a/plugins/woocommerce/changelog/refactor-unit-test-workflow +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev -Comment: Just making some changes to support the new CI workflow. - diff --git a/plugins/woocommerce/changelog/trunk b/plugins/woocommerce/changelog/trunk deleted file mode 100644 index b67b210de7b..00000000000 --- a/plugins/woocommerce/changelog/trunk +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Escape the default 'thank you' text instead of the filtered message. diff --git a/plugins/woocommerce/changelog/try-cys-temporary-iframe-solution b/plugins/woocommerce/changelog/try-cys-temporary-iframe-solution new file mode 100644 index 00000000000..a87341bd340 --- /dev/null +++ b/plugins/woocommerce/changelog/try-cys-temporary-iframe-solution @@ -0,0 +1,4 @@ +Significance: minor +Type: dev + +Use iframe to improve assembler hub loading time perception diff --git a/plugins/woocommerce/changelog/try-feature-sub-settings b/plugins/woocommerce/changelog/try-feature-sub-settings deleted file mode 100644 index bd9ba29efe3..00000000000 --- a/plugins/woocommerce/changelog/try-feature-sub-settings +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Consolidate HPOS back into a single "feature" for the purposes of showing it on the Features settings screen. \ No newline at end of file diff --git a/plugins/woocommerce/changelog/tweak-40821-cys-save-button-spinner b/plugins/woocommerce/changelog/tweak-40821-cys-save-button-spinner deleted file mode 100644 index d459daa6b06..00000000000 --- a/plugins/woocommerce/changelog/tweak-40821-cys-save-button-spinner +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: tweak - -Update save and done button loading indicator to use spinner diff --git a/plugins/woocommerce/changelog/tweak-flaky-meta-data-save-test b/plugins/woocommerce/changelog/tweak-flaky-meta-data-save-test deleted file mode 100644 index 4583d6132ef..00000000000 --- a/plugins/woocommerce/changelog/tweak-flaky-meta-data-save-test +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev - -Tweak a flaky test for meta data saving diff --git a/plugins/woocommerce/changelog/tweak-ignore-some-metadata-in-hpos-verify-tool b/plugins/woocommerce/changelog/tweak-ignore-some-metadata-in-hpos-verify-tool deleted file mode 100644 index cdc7205b591..00000000000 --- a/plugins/woocommerce/changelog/tweak-ignore-some-metadata-in-hpos-verify-tool +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: tweak - -Exclude some metadata from being considered in HPOS verify tool. diff --git a/plugins/woocommerce/changelog/tweak-refactor-blocks-org b/plugins/woocommerce/changelog/tweak-refactor-blocks-org deleted file mode 100644 index 3c6e5f7b12a..00000000000 --- a/plugins/woocommerce/changelog/tweak-refactor-blocks-org +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: dev -Comment: Adjust BlockRegistry to support new directory structure - - diff --git a/plugins/woocommerce/changelog/update-38191-fix-german-translation-error-on-reactivation b/plugins/woocommerce/changelog/update-38191-fix-german-translation-error-on-reactivation deleted file mode 100644 index 61b92e73e6f..00000000000 --- a/plugins/woocommerce/changelog/update-38191-fix-german-translation-error-on-reactivation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Skip combining translation files without comment.reference \ No newline at end of file diff --git a/plugins/woocommerce/changelog/update-40298-implement-back-to-home-button b/plugins/woocommerce/changelog/update-40298-implement-back-to-home-button deleted file mode 100644 index 0cab208c592..00000000000 --- a/plugins/woocommerce/changelog/update-40298-implement-back-to-home-button +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Implement back to home actions for the customize your store. diff --git a/plugins/woocommerce/changelog/update-40426-remove-SMB-and-large-logic-cys b/plugins/woocommerce/changelog/update-40426-remove-SMB-and-large-logic-cys deleted file mode 100644 index cb7fc2a1407..00000000000 --- a/plugins/woocommerce/changelog/update-40426-remove-SMB-and-large-logic-cys +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Remove homepage prompt logic from CYS \ No newline at end of file diff --git a/plugins/woocommerce/changelog/update-40536-connect-themes-API-cys-intro b/plugins/woocommerce/changelog/update-40536-connect-themes-API-cys-intro deleted file mode 100644 index df87f949b96..00000000000 --- a/plugins/woocommerce/changelog/update-40536-connect-themes-API-cys-intro +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Use the newly added themes REST API on the CYS intro page \ No newline at end of file diff --git a/plugins/woocommerce/changelog/update-40591_variation_switching_when_deleting b/plugins/woocommerce/changelog/update-40591_variation_switching_when_deleting deleted file mode 100644 index 0d03d891294..00000000000 --- a/plugins/woocommerce/changelog/update-40591_variation_switching_when_deleting +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Redirect to next variation if deleting a variation on the edit variation page. diff --git a/plugins/woocommerce/changelog/update-40896_variation_switcher b/plugins/woocommerce/changelog/update-40896_variation_switcher deleted file mode 100644 index 008937b2306..00000000000 --- a/plugins/woocommerce/changelog/update-40896_variation_switcher +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update logic of deleting variation to go to previous variation if the last one is deleted. diff --git a/plugins/woocommerce/changelog/update-40916-get-recommended-themes b/plugins/woocommerce/changelog/update-40916-get-recommended-themes new file mode 100644 index 00000000000..d07d7d5d544 --- /dev/null +++ b/plugins/woocommerce/changelog/update-40916-get-recommended-themes @@ -0,0 +1,4 @@ +Significance: patch +Type: update + +Updates the OnboardingThemes->get_recommended_themes() method to check the filtered response to see if any of the themes are active. diff --git a/plugins/woocommerce/changelog/update-action-scheduler-3.6.4 b/plugins/woocommerce/changelog/update-action-scheduler-3.6.4 deleted file mode 100644 index 8c27157c45d..00000000000 --- a/plugins/woocommerce/changelog/update-action-scheduler-3.6.4 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update Action Scheduler to 3.6.4 \ No newline at end of file diff --git a/plugins/woocommerce/changelog/update-cys-color-ai b/plugins/woocommerce/changelog/update-cys-color-ai deleted file mode 100644 index 01976cef451..00000000000 --- a/plugins/woocommerce/changelog/update-cys-color-ai +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: enhancement - -Add look and feel tags to color choices diff --git a/plugins/woocommerce/changelog/update-cys-display-all-6-homeapge-blocks b/plugins/woocommerce/changelog/update-cys-display-all-6-homeapge-blocks deleted file mode 100644 index 4d999944875..00000000000 --- a/plugins/woocommerce/changelog/update-cys-display-all-6-homeapge-blocks +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Render all six homepage templates from the CYS homepage sidebar. diff --git a/plugins/woocommerce/changelog/update-make-cys-intro-responsive b/plugins/woocommerce/changelog/update-cys-font-color-choices similarity index 52% rename from plugins/woocommerce/changelog/update-make-cys-intro-responsive rename to plugins/woocommerce/changelog/update-cys-font-color-choices index 98b450646f9..742ae3563f9 100644 --- a/plugins/woocommerce/changelog/update-make-cys-intro-responsive +++ b/plugins/woocommerce/changelog/update-cys-font-color-choices @@ -1,4 +1,4 @@ Significance: patch Type: update -Make cys intro page responsive +Update cys color/font choices diff --git a/plugins/woocommerce/changelog/update-cys-font-paring b/plugins/woocommerce/changelog/update-cys-font-paring deleted file mode 100644 index 0b3694f96e7..00000000000 --- a/plugins/woocommerce/changelog/update-cys-font-paring +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Replace font ai suggestion with pre-defined Look & Feel cluster diff --git a/plugins/woocommerce/changelog/update-cys-intro-page b/plugins/woocommerce/changelog/update-cys-intro-page deleted file mode 100644 index b23a7454ee2..00000000000 --- a/plugins/woocommerce/changelog/update-cys-intro-page +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -CYS - Intro page design updates \ No newline at end of file diff --git a/plugins/woocommerce/changelog/update-cys-intro-themes b/plugins/woocommerce/changelog/update-cys-intro-themes deleted file mode 100644 index 65dbb5bd2f6..00000000000 --- a/plugins/woocommerce/changelog/update-cys-intro-themes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Minor improvements to the recommended themes in the Customize Your Store task \ No newline at end of file diff --git a/plugins/woocommerce/changelog/update-disable-cys-frame-navigation b/plugins/woocommerce/changelog/update-disable-cys-frame-navigation deleted file mode 100644 index 3c13a447e3a..00000000000 --- a/plugins/woocommerce/changelog/update-disable-cys-frame-navigation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -CYS: Make the frame not navigable for the MVP diff --git a/plugins/woocommerce/changelog/update-handle-cys-ai-loader-errors b/plugins/woocommerce/changelog/update-handle-cys-ai-loader-errors deleted file mode 100644 index 9c22663b0bb..00000000000 --- a/plugins/woocommerce/changelog/update-handle-cys-ai-loader-errors +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Handle CYS ai wizard API failures diff --git a/plugins/woocommerce/changelog/update-helper-skip-woo-af-plugin b/plugins/woocommerce/changelog/update-helper-skip-woo-af-plugin deleted file mode 100644 index 9748c982c82..00000000000 --- a/plugins/woocommerce/changelog/update-helper-skip-woo-af-plugin +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fix - -Adds condition to ensure WooCommerce is not listed as a Woo extension in the Helper list. Restores the `woocommerce_show_addons_page` filter as a means of controlling whether the addons page is added as a WooCommerce submenu item. Hides a temporary extra addons submenu item using a better method borrowed from Jetpack. \ No newline at end of file diff --git a/plugins/woocommerce/changelog/update-k6-failing-tests-in-CI b/plugins/woocommerce/changelog/update-k6-failing-tests-in-CI deleted file mode 100644 index 0cab208c592..00000000000 --- a/plugins/woocommerce/changelog/update-k6-failing-tests-in-CI +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Implement back to home actions for the customize your store. diff --git a/plugins/woocommerce/changelog/update-k6-home-wc-admin-correlation b/plugins/woocommerce/changelog/update-k6-home-wc-admin-correlation deleted file mode 100644 index 344e7f8402e..00000000000 --- a/plugins/woocommerce/changelog/update-k6-home-wc-admin-correlation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update correlation to allow previously removed Perf Requests to run again diff --git a/plugins/woocommerce/changelog/update-marketing-kb-endpoints b/plugins/woocommerce/changelog/update-marketing-kb-endpoints deleted file mode 100644 index 56d490a25cf..00000000000 --- a/plugins/woocommerce/changelog/update-marketing-kb-endpoints +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Updates the marketing knowledgebase API endpoint diff --git a/plugins/woocommerce/changelog/update-mobile-onboarding-task b/plugins/woocommerce/changelog/update-mobile-onboarding-task deleted file mode 100644 index 8103a9c26a5..00000000000 --- a/plugins/woocommerce/changelog/update-mobile-onboarding-task +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Updated the Woo mobile onboarding modal to focus on app installation. diff --git a/plugins/woocommerce/changelog/update-project-labeler-labels b/plugins/woocommerce/changelog/update-project-labeler-labels deleted file mode 100644 index 10bb8cb09fe..00000000000 --- a/plugins/woocommerce/changelog/update-project-labeler-labels +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -update project labeler workflow configuration labels diff --git a/plugins/woocommerce/changelog/update-improve-font-color-performance b/plugins/woocommerce/changelog/update-reduce-intro-loading-time similarity index 52% rename from plugins/woocommerce/changelog/update-improve-font-color-performance rename to plugins/woocommerce/changelog/update-reduce-intro-loading-time index 6dd581acc80..87c2bea3937 100644 --- a/plugins/woocommerce/changelog/update-improve-font-color-performance +++ b/plugins/woocommerce/changelog/update-reduce-intro-loading-time @@ -1,4 +1,4 @@ Significance: patch Type: performance -Improve CYS font/color performance +Reduce cys intro page loading time diff --git a/plugins/woocommerce/changelog/update-remove-primary-secondary-border-from-cys-themes-rest-api b/plugins/woocommerce/changelog/update-remove-primary-secondary-border-from-cys-themes-rest-api deleted file mode 100644 index f6211ffdc17..00000000000 --- a/plugins/woocommerce/changelog/update-remove-primary-secondary-border-from-cys-themes-rest-api +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Remove backround, primary_border, secondary_border from the schema from themes REST API \ No newline at end of file diff --git a/plugins/woocommerce/changelog/update-retain-cys-unsave-changes b/plugins/woocommerce/changelog/update-retain-cys-unsave-changes deleted file mode 100644 index dfbca50036a..00000000000 --- a/plugins/woocommerce/changelog/update-retain-cys-unsave-changes +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -CYS: Retain unsave changes and save all the unsaved when users click the "done" button diff --git a/plugins/woocommerce/changelog/update-separate-php-and-js-tests b/plugins/woocommerce/changelog/update-separate-php-and-js-tests deleted file mode 100644 index 12fd177d1fa..00000000000 --- a/plugins/woocommerce/changelog/update-separate-php-and-js-tests +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: dev -Comment: This is just a change to developer commands. - diff --git a/plugins/woocommerce/changelog/update-set-default-font-pairing b/plugins/woocommerce/changelog/update-set-default-font-pairing deleted file mode 100644 index 142b510408f..00000000000 --- a/plugins/woocommerce/changelog/update-set-default-font-pairing +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Set Set default font pairing for CYS diff --git a/plugins/woocommerce/changelog/update-template-api-deprecate-conditional-block b/plugins/woocommerce/changelog/update-template-api-deprecate-conditional-block deleted file mode 100644 index 7df1e644595..00000000000 --- a/plugins/woocommerce/changelog/update-template-api-deprecate-conditional-block +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Add Block Template API conditional visibility example to documentation. diff --git a/plugins/woocommerce/changelog/update-woocommerce-blocks-11.2.0 b/plugins/woocommerce/changelog/update-woocommerce-blocks-11.2.0 deleted file mode 100644 index 42d37afcda0..00000000000 --- a/plugins/woocommerce/changelog/update-woocommerce-blocks-11.2.0 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update WooCommerce Blocks to 11.2.0 diff --git a/plugins/woocommerce/changelog/update-woocommerce-blocks-11.3.0 b/plugins/woocommerce/changelog/update-woocommerce-blocks-11.3.0 deleted file mode 100644 index b911477f5d6..00000000000 --- a/plugins/woocommerce/changelog/update-woocommerce-blocks-11.3.0 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -Update WooCommerce Blocks to 11.3.0 diff --git a/plugins/woocommerce/changelog/update-woocommerce-blocks-to-11.3.1 b/plugins/woocommerce/changelog/update-woocommerce-blocks-to-11.3.1 deleted file mode 100644 index 545c5016c57..00000000000 --- a/plugins/woocommerce/changelog/update-woocommerce-blocks-to-11.3.1 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: update - -Update WooCommerce Blocks to 11.3.1 diff --git a/plugins/woocommerce/changelog/wcios-mobile-onboarding-task-iteration-2 b/plugins/woocommerce/changelog/wcios-mobile-onboarding-task-iteration-2 deleted file mode 100644 index a1a58f99b98..00000000000 --- a/plugins/woocommerce/changelog/wcios-mobile-onboarding-task-iteration-2 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: update - -two steps app onboarding diff --git a/plugins/woocommerce/composer.json b/plugins/woocommerce/composer.json index 5041a34b23a..b5329f334b8 100644 --- a/plugins/woocommerce/composer.json +++ b/plugins/woocommerce/composer.json @@ -23,7 +23,7 @@ "maxmind-db/reader": "^1.11", "pelago/emogrifier": "^6.0", "woocommerce/action-scheduler": "3.6.4", - "woocommerce/woocommerce-blocks": "11.3.1" + "woocommerce/woocommerce-blocks": "11.4.1" }, "require-dev": { "automattic/jetpack-changelogger": "^3.3.0", diff --git a/plugins/woocommerce/composer.lock b/plugins/woocommerce/composer.lock index 109ed65bba0..5ba6a51608a 100644 --- a/plugins/woocommerce/composer.lock +++ b/plugins/woocommerce/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "153b28fe288733c8aed87718fd6a3792", + "content-hash": "fc9ea107b31f1926e5424183bc304de5", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -1004,16 +1004,16 @@ }, { "name": "woocommerce/woocommerce-blocks", - "version": "11.3.1", + "version": "11.4.1", "source": { "type": "git", "url": "https://github.com/woocommerce/woocommerce-blocks.git", - "reference": "52d88c715572d98596c0160a1cfb896a253d6b85" + "reference": "2511fa9d20474b6c349af1ce487f93d05d06991a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/woocommerce/woocommerce-blocks/zipball/52d88c715572d98596c0160a1cfb896a253d6b85", - "reference": "52d88c715572d98596c0160a1cfb896a253d6b85", + "url": "https://api.github.com/repos/woocommerce/woocommerce-blocks/zipball/2511fa9d20474b6c349af1ce487f93d05d06991a", + "reference": "2511fa9d20474b6c349af1ce487f93d05d06991a", "shasum": "" }, "require": { @@ -1064,9 +1064,9 @@ ], "support": { "issues": "https://github.com/woocommerce/woocommerce-blocks/issues", - "source": "https://github.com/woocommerce/woocommerce-blocks/tree/v11.3.1" + "source": "https://github.com/woocommerce/woocommerce-blocks/tree/v11.4.1" }, - "time": "2023-10-17T13:36:56+00:00" + "time": "2023-10-25T13:08:08+00:00" } ], "packages-dev": [ @@ -3949,5 +3949,5 @@ "platform-overrides": { "php": "7.4" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/plugins/woocommerce/includes/admin/settings/class-wc-settings-advanced.php b/plugins/woocommerce/includes/admin/settings/class-wc-settings-advanced.php index a90c6beeaf3..a1ab21472bc 100644 --- a/plugins/woocommerce/includes/admin/settings/class-wc-settings-advanced.php +++ b/plugins/woocommerce/includes/admin/settings/class-wc-settings-advanced.php @@ -63,7 +63,7 @@ class WC_Settings_Advanced extends WC_Settings_Page { array( 'title' => __( 'Cart page', 'woocommerce' ), /* Translators: %s Page contents. */ - 'desc' => sprintf( __( 'Page contents: [%s]', 'woocommerce' ), apply_filters( 'woocommerce_cart_shortcode_tag', 'woocommerce_cart' ) ), + 'desc' => __( 'Page where shoppers review their shopping cart', 'woocommerce' ), 'id' => 'woocommerce_cart_page_id', 'type' => 'single_select_page_with_search', 'default' => '', @@ -83,7 +83,7 @@ class WC_Settings_Advanced extends WC_Settings_Page { array( 'title' => __( 'Checkout page', 'woocommerce' ), /* Translators: %s Page contents. */ - 'desc' => sprintf( __( 'Page contents: [%s]', 'woocommerce' ), apply_filters( 'woocommerce_checkout_shortcode_tag', 'woocommerce_checkout' ) ), + 'desc' => __( 'Page where shoppers go to finalize their purchase', 'woocommerce' ), 'id' => 'woocommerce_checkout_page_id', 'type' => 'single_select_page_with_search', 'default' => wc_get_page_id( 'checkout' ), diff --git a/plugins/woocommerce/includes/class-wc-checkout.php b/plugins/woocommerce/includes/class-wc-checkout.php index 8dc5c20e121..89dec95fe54 100644 --- a/plugins/woocommerce/includes/class-wc-checkout.php +++ b/plugins/woocommerce/includes/class-wc-checkout.php @@ -1046,6 +1046,11 @@ class WC_Checkout { // Store Order ID in session so it can be re-used after payment failure. WC()->session->set( 'order_awaiting_payment', $order_id ); + // We save the session early because if the payment gateway hangs + // the request will never finish, thus the session data will neved be saved, + // and this can lead to duplicate orders if the user submits the order again. + WC()->session->save_data(); + // Process Payment. $result = $available_gateways[ $payment_method ]->process_payment( $order_id ); diff --git a/plugins/woocommerce/includes/class-wc-install.php b/plugins/woocommerce/includes/class-wc-install.php index ce300f39c6e..492b098b41c 100644 --- a/plugins/woocommerce/includes/class-wc-install.php +++ b/plugins/woocommerce/includes/class-wc-install.php @@ -767,15 +767,21 @@ class WC_Install { * Determines the cart shortcode tag used for the cart page. * * @since 2.1.0 + * @deprecated 8.3.0 This filter is deprecated and will be removed in future versions. */ - $cart_shortcode = apply_filters( 'woocommerce_cart_shortcode_tag', 'woocommerce_cart' ); + $cart_shortcode = apply_filters_deprecated( 'woocommerce_cart_shortcode_tag', array( '' ), '8.3.0', 'woocommerce_create_pages' ); + + $cart_page_content = empty( $cart_shortcode ) ? self::get_cart_block_content() : '[' . $cart_shortcode . ']'; /** * Determines the checkout shortcode tag used on the checkout page. * * @since 2.1.0 + * @deprecated 8.3.0 This filter is deprecated and will be removed in future versions. */ - $checkout_shortcode = apply_filters( 'woocommerce_checkout_shortcode_tag', 'woocommerce_checkout' ); + $checkout_shortcode = apply_filters_deprecated( 'woocommerce_checkout_shortcode_tag', array( '' ), '8.3.0', 'woocommerce_create_pages' ); + + $checkout_page_content = empty( $checkout_shortcode ) ? self::get_checkout_block_content() : '[' . $checkout_shortcode . ']'; /** * Determines the my account shortcode tag used on the my account page. @@ -800,12 +806,12 @@ class WC_Install { 'cart' => array( 'name' => _x( 'cart', 'Page slug', 'woocommerce' ), 'title' => _x( 'Cart', 'Page title', 'woocommerce' ), - 'content' => '[' . $cart_shortcode . ']', + 'content' => $cart_page_content, ), 'checkout' => array( 'name' => _x( 'checkout', 'Page slug', 'woocommerce' ), 'title' => _x( 'Checkout', 'Page title', 'woocommerce' ), - 'content' => '[' . $checkout_shortcode . ']', + 'content' => $checkout_page_content, ), 'myaccount' => array( 'name' => _x( 'my-account', 'Page slug', 'woocommerce' ), @@ -2432,6 +2438,182 @@ EOT; add_option( 'woocommerce_refund_returns_page_created', $page_id, '', false ); } } + + /** + * Get the Cart block content. + * + * @since 8.3.0 + * @return string + */ + protected static function get_cart_block_content() { + return ' +
+
+
+
+ + + +
+

' . __( 'You may be interested in…', 'woocommerce' ) . '

+ + + +
+
+
+ + + +
+
+
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+ + + +
+ + + +
+ + + +
+
+
+ + + +
+

' . __( 'Your cart is currently empty!', 'woocommerce' ) . '

+ + + +
+ + + +

' . __( 'New in store', 'woocommerce' ) . '

+ + +
+
+'; + } + + /** + * Get the Checkout block content. + * + * @since 8.3.0 + * @return string + */ + protected static function get_checkout_block_content() { + return ' +
+
+
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+ + + +
+
+
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+
+
+'; + } } WC_Install::init(); diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-v2-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-v2-controller.php index 6b6192bd1ba..99c9bc3b676 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-v2-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-v2-controller.php @@ -1333,12 +1333,12 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller { ), _x( 'Cart', 'Page setting', 'woocommerce' ) => array( 'option' => 'woocommerce_cart_page_id', - 'shortcode' => '[' . apply_filters( 'woocommerce_cart_shortcode_tag', 'woocommerce_cart' ) . ']', + 'shortcode' => '[' . apply_filters_deprecated( 'woocommerce_cart_shortcode_tag', array( 'woocommerce_cart' ), '8.3.0', 'woocommerce_create_pages' ) . ']', 'block' => 'woocommerce/cart', ), _x( 'Checkout', 'Page setting', 'woocommerce' ) => array( 'option' => 'woocommerce_checkout_page_id', - 'shortcode' => '[' . apply_filters( 'woocommerce_checkout_shortcode_tag', 'woocommerce_checkout' ) . ']', + 'shortcode' => '[' . apply_filters_deprecated( 'woocommerce_checkout_shortcode_tag', array( 'woocommerce_checkout' ), '8.3.0', 'woocommerce_create_pages' ) . ']', 'block' => 'woocommerce/checkout', ), _x( 'My account', 'Page setting', 'woocommerce' ) => array( @@ -1388,6 +1388,11 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller { if ( $values['block'] && get_post( $page_id ) ) { $block_required = true; $block_present = WC_Blocks_Utils::has_block_in_page( $page_id, $values['block'] ); + + // Compatibility with the classic shortcode block which can be used instead of shortcodes. + if ( ! $block_present && ( 'woocommerce/checkout' === $values['block'] || 'woocommerce/cart' === $values['block'] ) ) { + $block_present = WC_Blocks_Utils::has_block_in_page( $page_id, 'woocommerce/classic-shortcode', true ); + } } // Wrap up our findings into an output array. diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php index 27f9dd779b0..b759041e4e4 100644 --- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php +++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php @@ -119,7 +119,7 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Product_Variations_V 'attributes' => $this->get_attributes( $object ), 'menu_order' => $object->get_menu_order(), 'meta_data' => $object->get_meta_data(), - 'name' => preg_replace( '/' . preg_quote( $object->get_title() . ' - ', '/' ) . '/', '', $object->get_name(), 1 ), + 'name' => wc_get_formatted_variation( $object, true, false, false ), 'parent_id' => $object->get_parent_id(), ); diff --git a/plugins/woocommerce/phpcs.xml b/plugins/woocommerce/phpcs.xml index fd355d33463..c4b4a07e733 100644 --- a/plugins/woocommerce/phpcs.xml +++ b/plugins/woocommerce/phpcs.xml @@ -102,40 +102,4 @@ tests/php/ - - - - src/Internal/Admin/ - src/Admin/ - - - - - src/Internal/Admin/ - src/Admin/ - - - - - src/Internal/Admin/ - src/Admin/ - - - - - src/Internal/Admin/ - src/Admin/ - - - - - src/Internal/Admin/ - src/Admin/ - - - - - src/Internal/Admin/ - src/Admin/ - diff --git a/plugins/woocommerce/readme.txt b/plugins/woocommerce/readme.txt index 90b402b50b9..1230dffbb1c 100644 --- a/plugins/woocommerce/readme.txt +++ b/plugins/woocommerce/readme.txt @@ -163,6 +163,6 @@ WooCommerce comes with some sample data you can use to see how products look; im == Changelog == -= 8.3.0 2023-XX-XX = += 8.4.0 2023-XX-XX = [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt). diff --git a/plugins/woocommerce/src/Admin/API/OnboardingThemes.php b/plugins/woocommerce/src/Admin/API/OnboardingThemes.php index 97fbf490b2a..63564da6d8d 100644 --- a/plugins/woocommerce/src/Admin/API/OnboardingThemes.php +++ b/plugins/woocommerce/src/Admin/API/OnboardingThemes.php @@ -249,8 +249,6 @@ class OnboardingThemes extends \WC_REST_Data_Controller { ); } - $current_theme_slug = wp_get_theme()->get_stylesheet(); - // To be implemented: 1. Fetch themes from the marketplace API. 2. Convert prices to the requested currency. // These are Dotcom themes. $themes = array( @@ -260,7 +258,6 @@ class OnboardingThemes extends \WC_REST_Data_Controller { 'color_palettes' => array(), 'total_palettes' => 0, 'slug' => 'tsubaki', - 'is_active' => 'tsubaki' === $current_theme_slug, 'thumbnail_url' => 'https://i0.wp.com/s2.wp.com/wp-content/themes/premium/tsubaki/screenshot.png', 'link_url' => 'https://wordpress.com/theme/tsubaki/', ), @@ -270,7 +267,6 @@ class OnboardingThemes extends \WC_REST_Data_Controller { 'color_palettes' => array(), 'total_palettes' => 0, 'slug' => 'tazza', - 'is_active' => 'tazza' === $current_theme_slug, 'thumbnail_url' => 'https://i0.wp.com/s2.wp.com/wp-content/themes/premium/tazza/screenshot.png', 'link_url' => 'https://wordpress.com/theme/tazza/', 'total_palettes' => 0, @@ -302,7 +298,6 @@ class OnboardingThemes extends \WC_REST_Data_Controller { ), 'total_palettes' => 5, 'slug' => 'amulet', - 'is_active' => 'amulet' === $current_theme_slug, 'thumbnail_url' => 'https://i0.wp.com/s2.wp.com/wp-content/themes/premium/amulet/screenshot.png', 'link_url' => 'https://wordpress.com/theme/amulet/', ), @@ -333,7 +328,6 @@ class OnboardingThemes extends \WC_REST_Data_Controller { ), 'total_palettes' => 11, 'slug' => 'zaino', - 'is_active' => 'zaino' === $current_theme_slug, 'thumbnail_url' => 'https://i0.wp.com/s2.wp.com/wp-content/themes/premium/zaino/screenshot.png', 'link_url' => 'https://wordpress.com/theme/zaino/', ), @@ -374,12 +368,27 @@ class OnboardingThemes extends \WC_REST_Data_Controller { * * @return array */ - return apply_filters( + $filtered_response = apply_filters( '__experimental_woocommerce_rest_get_recommended_themes', $response, $industry, $currency ); + + /** + * Loop through themes checking to see if any are currently active + */ + $active_theme = get_stylesheet(); + + foreach ( $filtered_response['themes'] as &$theme ) { + if ( $theme['slug'] === $active_theme ) { + $theme['is_active'] = true; + } else { + $theme['is_active'] = false; + } + } + + return $filtered_response; } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/CustomizeStore.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/CustomizeStore.php index 2714ac4e6c7..dee7e6c0db5 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/CustomizeStore.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/CustomizeStore.php @@ -81,17 +81,27 @@ class CustomizeStore extends Task { return true; } + /** + * Action URL. + * + * @return string + */ + public function get_action_url() { + return admin_url( 'wp-admin/admin.php?page=wc-admin&path=%2Fcustomize-store' ); + } + + /** * Possibly add site editor scripts. */ public function possibly_add_site_editor_scripts() { - $is_customize_store_pages = ( + $is_assembler_hub = ( isset( $_GET['page'] ) && 'wc-admin' === $_GET['page'] && isset( $_GET['path'] ) && - str_starts_with( wc_clean( wp_unslash( $_GET['path'] ) ), '/customize-store' ) + str_starts_with( wc_clean( wp_unslash( $_GET['path'] ) ), '/customize-store/assembler-hub' ) ); - if ( ! $is_customize_store_pages ) { + if ( ! $is_assembler_hub ) { return; } diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/ExperimentalShippingRecommendation.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/ExperimentalShippingRecommendation.php index 9b581dc4c86..023b9e3b6b4 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/ExperimentalShippingRecommendation.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/ExperimentalShippingRecommendation.php @@ -2,6 +2,7 @@ namespace Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks; +use Automattic\Jetpack\Connection\Manager; use Automattic\WooCommerce\Admin\Features\Features; use Automattic\WooCommerce\Admin\Features\OnboardingTasks\Task; use Automattic\WooCommerce\Admin\PluginsHelper; @@ -79,8 +80,7 @@ class ExperimentalShippingRecommendation extends Task { * @return bool */ public static function has_plugins_active() { - return PluginsHelper::is_plugin_active( 'woocommerce-services' ) && - PluginsHelper::is_plugin_active( 'jetpack' ); + return PluginsHelper::is_plugin_active( 'woocommerce-services' ); } /** @@ -89,9 +89,8 @@ class ExperimentalShippingRecommendation extends Task { * @return bool */ public static function has_jetpack_connected() { - if ( class_exists( '\Jetpack' ) && is_callable( '\Jetpack::is_connection_ready' ) ) { - return \Jetpack::is_connection_ready(); - } - return false; + $jetpack_connection_manager = new Manager( 'woocommerce' ); + + return $jetpack_connection_manager->is_connected() && $jetpack_connection_manager->has_connected_owner(); } } diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Tax.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Tax.php index c5331ea04a0..80d8d517598 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Tax.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Tax.php @@ -79,7 +79,7 @@ class Tax extends Task { public function get_content() { return self::can_use_automated_taxes() ? __( - 'Good news! WooCommerce Services and Jetpack can automate your sales tax calculations for you.', + 'Good news! WooCommerce Tax can automate your sales tax calculations for you.', 'woocommerce' ) : __( diff --git a/plugins/woocommerce/src/Admin/Notes/DeprecatedNotes.php b/plugins/woocommerce/src/Admin/Notes/DeprecatedNotes.php index baf2645ada9..9f293db215f 100644 --- a/plugins/woocommerce/src/Admin/Notes/DeprecatedNotes.php +++ b/plugins/woocommerce/src/Admin/Notes/DeprecatedNotes.php @@ -496,27 +496,6 @@ class WC_Admin_Notes_Selling_Online_Courses extends DeprecatedClassFacade { protected static $deprecated_in_version = '4.8.0'; } -/** - * WC_Admin_Notes_Test_Checkout. - * - * @deprecated since 4.8.0, use TestCheckout - */ -class WC_Admin_Notes_Test_Checkout extends DeprecatedClassFacade { - /** - * The name of the non-deprecated class that this facade covers. - * - * @var string - */ - protected static $facade_over_classname = 'Automattic\WooCommerce\Internal\Admin\Notes\TestCheckout'; - - /** - * The version that this class was deprecated in. - * - * @var string - */ - protected static $deprecated_in_version = '4.8.0'; -} - /** * WC_Admin_Notes_Tracking_Opt_In. * diff --git a/plugins/woocommerce/src/Internal/Admin/Events.php b/plugins/woocommerce/src/Internal/Admin/Events.php index 8758234a56c..ed1af2c7ade 100644 --- a/plugins/woocommerce/src/Internal/Admin/Events.php +++ b/plugins/woocommerce/src/Internal/Admin/Events.php @@ -36,7 +36,6 @@ use Automattic\WooCommerce\Internal\Admin\Notes\PerformanceOnMobile; use Automattic\WooCommerce\Internal\Admin\Notes\PersonalizeStore; use Automattic\WooCommerce\Internal\Admin\Notes\RealTimeOrderAlerts; use Automattic\WooCommerce\Internal\Admin\Notes\SellingOnlineCourses; -use Automattic\WooCommerce\Internal\Admin\Notes\TestCheckout; use Automattic\WooCommerce\Internal\Admin\Notes\TrackingOptIn; use Automattic\WooCommerce\Internal\Admin\Notes\UnsecuredReportFiles; use Automattic\WooCommerce\Internal\Admin\Notes\WooCommercePayments; @@ -92,7 +91,6 @@ class Events { PerformanceOnMobile::class, PersonalizeStore::class, RealTimeOrderAlerts::class, - TestCheckout::class, TrackingOptIn::class, WooCommercePayments::class, WooCommerceSubscriptions::class, @@ -156,7 +154,7 @@ class Events { MerchantEmailNotifications::run(); } - if ( Features::is_enabled( 'onboarding' ) ) { + if ( Features::is_enabled( 'core-profiler' ) ) { ( new MailchimpScheduler() )->run(); } } diff --git a/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php b/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php index ea4c18caa1c..31ce6bb2a64 100644 --- a/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php +++ b/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php @@ -14,7 +14,6 @@ use Automattic\WooCommerce\Internal\Admin\Notes\WooSubscriptionsNotes; use Automattic\WooCommerce\Internal\Admin\Notes\TrackingOptIn; use Automattic\WooCommerce\Internal\Admin\Notes\WooCommercePayments; use Automattic\WooCommerce\Internal\Admin\Notes\InstallJPAndWCSPlugins; -use Automattic\WooCommerce\Internal\Admin\Notes\TestCheckout; use Automattic\WooCommerce\Internal\Admin\Notes\SellingOnlineCourses; use Automattic\WooCommerce\Internal\Admin\Notes\MerchantEmailNotifications; use Automattic\WooCommerce\Internal\Admin\Notes\MagentoMigration; @@ -177,7 +176,6 @@ class FeaturePlugin { new TrackingOptIn(); new WooCommercePayments(); new InstallJPAndWCSPlugins(); - new TestCheckout(); new SellingOnlineCourses(); new MagentoMigration(); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/TestCheckout.php b/plugins/woocommerce/src/Internal/Admin/Notes/TestCheckout.php deleted file mode 100644 index a70417baf53..00000000000 --- a/plugins/woocommerce/src/Internal/Admin/Notes/TestCheckout.php +++ /dev/null @@ -1,104 +0,0 @@ - 1, - 'status' => 'publish', - 'orderby' => 'date', - 'order' => 'ASC', - ) - ); - - $products = $query->get_products(); - if ( 0 === count( $products ) ) { - return; - } - - $oldest_product_timestamp = $products[0]->get_date_created()->getTimestamp(); - $half_hour_in_seconds = 30 * MINUTE_IN_SECONDS; - if ( ( time() - $oldest_product_timestamp ) > $half_hour_in_seconds ) { - return; - } - - $content = __( 'Make sure that your checkout is working properly before you launch your store. Go through your checkout process in its entirety: from adding a product to your cart, choosing a shipping location, and making a payment.', 'woocommerce' ); - - $note = new Note(); - $note->set_title( __( 'Don\'t forget to test your checkout', 'woocommerce' ) ); - $note->set_content( $content ); - $note->set_content_data( (object) array() ); - $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); - $note->set_name( self::NOTE_NAME ); - $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'test-checkout', __( 'Test checkout', 'woocommerce' ), wc_get_page_permalink( 'shop' ) ); - return $note; - } -} diff --git a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php index 90a089fe1db..12e7d2d3e09 100644 --- a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php +++ b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php @@ -75,6 +75,7 @@ class DefaultFreeExtensions { self::get_plugin( 'mailpoet' ), self::get_plugin( 'google-listings-and-ads' ), self::get_plugin( 'woocommerce-services:tax' ), + self::get_plugin( 'tiktok-for-business' ), ) ), ), diff --git a/plugins/woocommerce/tests/api-core-tests/global-setup.js b/plugins/woocommerce/tests/api-core-tests/global-setup.js index 09dcddbc598..dfc5b3cb98d 100644 --- a/plugins/woocommerce/tests/api-core-tests/global-setup.js +++ b/plugins/woocommerce/tests/api-core-tests/global-setup.js @@ -1,10 +1,15 @@ const { ENABLE_HPOS, GITHUB_TOKEN, UPDATE_WC } = process.env; const { downloadZip, deleteZip } = require( './utils/plugin-utils' ); const axios = require( 'axios' ).default; -const playwrightConfig = require('./playwright.config'); +const playwrightConfig = require( './playwright.config' ); +const { site } = require( './utils' ); + +/** + * + * @param {import('@playwright/test').FullConfig} config + */ module.exports = async ( config ) => { - // If API_BASE_URL is configured and doesn't include localhost, running on daily host if ( process.env.API_BASE_URL && @@ -223,5 +228,7 @@ module.exports = async ( config ) => { process.exit( 1 ); } } + + await site.useCartCheckoutShortcodes( config ); } }; diff --git a/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js b/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js index 336b6cd0f9d..d6c7a08a12b 100644 --- a/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js +++ b/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js @@ -1650,10 +1650,11 @@ test.describe.serial( 'Settings API tests: CRUD', () => { expect.objectContaining( { id: 'woocommerce_cart_page_id', label: 'Cart page', - description: 'Page contents: [woocommerce_cart]', + description: + 'Page where shoppers review their shopping cart', type: 'select', default: '', - tip: 'Page contents: [woocommerce_cart]', + tip: 'Page where shoppers review their shopping cart', value: expect.any( String ), options: expect.any( Object ), } ), @@ -1669,10 +1670,10 @@ test.describe.serial( 'Settings API tests: CRUD', () => { id: 'woocommerce_checkout_page_id', label: 'Checkout page', description: - 'Page contents: [woocommerce_checkout]', + 'Page where shoppers go to finalize their purchase', type: 'select', default: expect.any( Number ), - tip: 'Page contents: [woocommerce_checkout]', + tip: 'Page where shoppers go to finalize their purchase', value: expect.any( String ), options: expect.any( Object ), } ), diff --git a/plugins/woocommerce/tests/api-core-tests/utils/site.js b/plugins/woocommerce/tests/api-core-tests/utils/site.js index 6fea5e6b0a9..1211c101b2a 100644 --- a/plugins/woocommerce/tests/api-core-tests/utils/site.js +++ b/plugins/woocommerce/tests/api-core-tests/utils/site.js @@ -237,6 +237,68 @@ const reset = async ( cKey, cSecret ) => { await deleteAllTaxRates(); }; +/** + * Convert Cart and Checkout pages to shortcode. + * @param {import('@playwright/test').FullConfig} config + */ +const useCartCheckoutShortcodes = async ( config ) => { + /** + * A WordPress page. + * @typedef {Object} WPPage + * @property {number} id + * @property {string} slug + */ + + const { request: apiRequest } = require( '@playwright/test' ); + const { baseURL, userAgent, extraHTTPHeaders } = config.projects[ 0 ].use; + + const options = { + baseURL, + userAgent, + extraHTTPHeaders, + }; + const request = await apiRequest.newContext( options ); + + // List all pages + const response_list = await request.get( '/wp-json/wp/v2/pages', { + data: { + _fields: [ 'id', 'slug' ], + }, + failOnStatusCode: true, + } ); + + /** + * @type {WPPage[]} + */ + const list = await response_list.json(); + + // Find the cart and checkout pages + const cart = list.find( ( page ) => page.slug === 'cart' ); + const checkout = list.find( ( page ) => page.slug === 'checkout' ); + + // Convert their contents to shortcodes + await request.put( `/wp-json/wp/v2/pages/${ cart.id }`, { + data: { + content: { + raw: '[woocommerce_cart]', + }, + }, + failOnStatusCode: true, + } ); + console.log( 'Cart page converted to shortcode.' ); + + await request.put( `/wp-json/wp/v2/pages/${ checkout.id }`, { + data: { + content: { + raw: '[woocommerce_checkout]', + }, + }, + failOnStatusCode: true, + } ); + console.log( 'Checkout page converted to shortcode.' ); +}; + module.exports = { reset, + useCartCheckoutShortcodes, }; diff --git a/plugins/woocommerce/tests/e2e-pw/global-setup.js b/plugins/woocommerce/tests/e2e-pw/global-setup.js index c46ded52ac8..a919e106f46 100644 --- a/plugins/woocommerce/tests/e2e-pw/global-setup.js +++ b/plugins/woocommerce/tests/e2e-pw/global-setup.js @@ -5,6 +5,9 @@ const { site } = require( './utils' ); const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default; const { ENABLE_HPOS } = process.env; +/** + * @param {import('@playwright/test').FullConfig} config + */ module.exports = async ( config ) => { const { stateDir, baseURL, userAgent } = config.projects[ 0 ].use; @@ -58,7 +61,7 @@ module.exports = async ( config ) => { for ( let i = 0; i < adminRetries; i++ ) { try { console.log( 'Trying to log-in as admin...' ); - await adminPage.goto( `/wp-admin` ); + await adminPage.goto( `/wp-admin`, { waitUntil: 'networkidle' } ); await adminPage .locator( 'input[name="log"]' ) .fill( admin.username ); @@ -139,7 +142,9 @@ module.exports = async ( config ) => { for ( let i = 0; i < customerRetries; i++ ) { try { console.log( 'Trying to log-in as customer...' ); - await customerPage.goto( `/wp-admin` ); + await customerPage.goto( `/wp-admin`, { + waitUntil: 'networkidle', + } ); await customerPage .locator( 'input[name="log"]' ) .fill( customer.username ); @@ -219,6 +224,8 @@ module.exports = async ( config ) => { } } + await site.useCartCheckoutShortcodes( baseURL, userAgent, admin ); + await adminContext.close(); await customerContext.close(); await browser.close(); diff --git a/plugins/woocommerce/tests/e2e-pw/global-teardown.js b/plugins/woocommerce/tests/e2e-pw/global-teardown.js index d432389b403..2e91ae543b4 100644 --- a/plugins/woocommerce/tests/e2e-pw/global-teardown.js +++ b/plugins/woocommerce/tests/e2e-pw/global-teardown.js @@ -18,7 +18,7 @@ module.exports = async ( config ) => { for ( let i = 0; i < keysRetries; i++ ) { try { console.log( 'Trying to clear consumer token... Try:' + i ); - await adminPage.goto( `/wp-admin` ); + await adminPage.goto( `/wp-admin`, { waitUntil: 'networkidle' } ); await adminPage .locator( 'input[name="log"]' ) .fill( admin.username ); @@ -26,6 +26,7 @@ module.exports = async ( config ) => { .locator( 'input[name="pwd"]' ) .fill( admin.password ); await adminPage.locator( 'text=Log In' ).click(); + await adminPage.waitForLoadState( 'networkidle' ); await adminPage.goto( `/wp-admin/admin.php?page=wc-settings&tab=advanced§ion=keys` ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-bulk-edit.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-bulk-edit.spec.js index 0a0619827d9..6ce46903ecd 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-bulk-edit.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-bulk-edit.spec.js @@ -66,24 +66,24 @@ test.describe( 'Bulk edit orders', () => { test( 'can bulk update order status', async ( { page } ) => { await page.goto( 'wp-admin/admin.php?page=wc-orders' ); - + // expect order status 'processing' to show - await expect( page.locator( `#order-${ orderId1 }`).getByText( 'Processing') ).toBeVisible(); - await expect( page.locator( `#order-${ orderId2 }`).getByText( 'Processing') ).toBeVisible(); - await expect( page.locator( `#order-${ orderId3 }`).getByText( 'Processing') ).toBeVisible(); - await expect( page.locator( `#order-${ orderId4 }`).getByText( 'Processing') ).toBeVisible(); - await expect( page.locator( `#order-${ orderId5 }`).getByText( 'Processing') ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId1 }, #post-${ orderId1 })` ).getByText( 'Processing' ) ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId2 }, #post-${ orderId2 })` ).getByText( 'Processing' ) ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId3 }, #post-${ orderId3 })` ).getByText( 'Processing' ) ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId4 }, #post-${ orderId4 })` ).getByText( 'Processing' ) ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId5 }, #post-${ orderId5 })` ).getByText( 'Processing' ) ).toBeVisible(); await page.locator( '#cb-select-all-1' ).click(); await page.locator( '#bulk-action-selector-top' ).selectOption( 'Change status to completed' ); await page.locator('#doaction').click(); // expect order status 'completed' to show - await expect( page.locator( `#order-${ orderId1 }`).getByText( 'Completed') ).toBeVisible(); - await expect( page.locator( `#order-${ orderId2 }`).getByText( 'Completed') ).toBeVisible(); - await expect( page.locator( `#order-${ orderId3 }`).getByText( 'Completed') ).toBeVisible(); - await expect( page.locator( `#order-${ orderId4 }`).getByText( 'Completed') ).toBeVisible(); - await expect( page.locator( `#order-${ orderId5 }`).getByText( 'Completed') ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId1 }, #post-${ orderId1 })`).getByText( 'Completed' ) ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId2 }, #post-${ orderId2 })`).getByText( 'Completed' ) ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId3 }, #post-${ orderId3 })`).getByText( 'Completed' ) ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId4 }, #post-${ orderId4 })`).getByText( 'Completed' ) ).toBeVisible(); + await expect( page.locator( `:is(#order-${ orderId5 }, #post-${ orderId5 })`).getByText( 'Completed' ) ).toBeVisible(); } ); } ); diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-edit.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-edit.spec.js index 444ed14c393..8807f6e16c3 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-edit.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-edit.spec.js @@ -78,7 +78,7 @@ test.describe( 'Edit order', () => { // load the orders listing and confirm order is completed await page.goto( 'wp-admin/admin.php?page=wc-orders' ); - await expect( page.locator( `#order-${ orderId }` ).getByRole( 'cell', { name: 'Completed' }) ).toBeVisible(); + await expect( page.locator( `:is(#order-${orderId}, #post-${orderId})` ).getByRole( 'cell', { name: 'Completed' }) ).toBeVisible(); } ); test( 'can update order status to cancelled', async ( { page } ) => { @@ -98,7 +98,7 @@ test.describe( 'Edit order', () => { // load the orders listing and confirm order is cancelled await page.goto( 'wp-admin/admin.php?page=wc-orders' ); - await expect( page.locator( `#order-${ orderToCancel }` ).getByRole( 'cell', { name: 'Cancelled' }) ).toBeVisible(); + await expect( page.locator( `:is(#order-${orderToCancel}, #post-${orderToCancel})` ).getByRole( 'cell', { name: 'Cancelled' }) ).toBeVisible(); } ); test( 'can update order details', async ( { page } ) => { diff --git a/plugins/woocommerce/tests/e2e-pw/utils/site.js b/plugins/woocommerce/tests/e2e-pw/utils/site.js index 6fea5e6b0a9..1c0f0a96aac 100644 --- a/plugins/woocommerce/tests/e2e-pw/utils/site.js +++ b/plugins/woocommerce/tests/e2e-pw/utils/site.js @@ -237,6 +237,72 @@ const reset = async ( cKey, cSecret ) => { await deleteAllTaxRates(); }; +/** + * Convert Cart and Checkout pages to shortcode. + */ +const useCartCheckoutShortcodes = async ( baseURL, userAgent, admin ) => { + /** + * A WordPress page. + * @typedef {Object} WPPage + * @property {number} id + * @property {string} slug + */ + + const { request: apiRequest } = require( '@playwright/test' ); + const { encodeCredentials } = require( './plugin-utils' ); + + const basicAuth = encodeCredentials( admin.username, admin.password ); + const Authorization = `Basic ${ basicAuth }`; + const extraHTTPHeaders = { + Authorization, + }; + const options = { + baseURL, + userAgent, + extraHTTPHeaders, + }; + const request = await apiRequest.newContext( options ); + + // List all pages + const response_list = await request.get( '/wp-json/wp/v2/pages', { + data: { + _fields: [ 'id', 'slug' ], + }, + failOnStatusCode: true, + } ); + + /** + * @type {WPPage[]} + */ + const list = await response_list.json(); + + // Find the cart and checkout pages + const cart = list.find( ( page ) => page.slug === 'cart' ); + const checkout = list.find( ( page ) => page.slug === 'checkout' ); + + // Convert their contents to shortcodes + await request.put( `/wp-json/wp/v2/pages/${ cart.id }`, { + data: { + content: { + raw: '[woocommerce_cart]', + }, + }, + failOnStatusCode: true, + } ); + console.log( 'Cart page converted to shortcode.' ); + + await request.put( `/wp-json/wp/v2/pages/${ checkout.id }`, { + data: { + content: { + raw: '[woocommerce_checkout]', + }, + }, + failOnStatusCode: true, + } ); + console.log( 'Checkout page converted to shortcode.' ); +}; + module.exports = { reset, + useCartCheckoutShortcodes, }; diff --git a/plugins/woocommerce/tests/performance/setup/cart-checkout-shortcode.js b/plugins/woocommerce/tests/performance/setup/cart-checkout-shortcode.js new file mode 100644 index 00000000000..eaa5204ef70 --- /dev/null +++ b/plugins/woocommerce/tests/performance/setup/cart-checkout-shortcode.js @@ -0,0 +1,116 @@ +/** + * k6 dependencies + */ +import encoding from 'k6/encoding'; +import http from 'k6/http'; +import { check } from 'k6'; + +/** + * Internal dependencies + */ +import { base_url, admin_username, admin_password } from '../config.js'; + +/** + * Convert Cart & Checkout pages to shortcode. + */ +export function useCartCheckoutShortcodes() { + /** + * A WordPress page. + * @typedef {Object} WPPage + * @property {number} id + * @property {string} slug + */ + + let defaultHeaders; + + /** + * @type {WPPage[]} + */ + let wp_pages; + + /** + * @type {WPPage} + */ + let cart; + + /** + * @type {WPPage} + */ + let checkout; + + function setDefaultHeaders() { + const credentials = `${ admin_username }:${ admin_password }`; + const encodedCredentials = encoding.b64encode( credentials ); + defaultHeaders = { + Authorization: `Basic ${ encodedCredentials }`, + 'Content-Type': 'application/json', + }; + } + + function listWPPages() { + const url = `${ base_url }/wp-json/wp/v2/pages`; + const body = { + _fields: [ 'id', 'slug' ], + context: 'edit', + }; + const params = { + headers: defaultHeaders, + }; + const response = http.get( url, body, params ); + check( response, { + 'WP pages list obtained': ( r ) => r.status === 200, + } ); + wp_pages = response.json(); + } + + function findCartCheckoutPage() { + cart = wp_pages.find( ( page ) => page.slug === 'cart' ); + checkout = wp_pages.find( ( page ) => page.slug === 'checkout' ); + } + + function convertToCartCheckoutShortcode() { + const url_cart = `${ base_url }/wp-json/wp/v2/pages/${ cart.id }`; + const url_checkout = `${ base_url }/wp-json/wp/v2/pages/${ checkout.id }`; + + const body_cart = { + content: { + raw: '[woocommerce_cart]', + }, + }; + const body_checkout = { + content: { + raw: '[woocommerce_checkout]', + }, + }; + + const body_cart_str = JSON.stringify( body_cart ); + const body_checkout_str = JSON.stringify( body_checkout ); + + const params = { + headers: defaultHeaders, + }; + + const response_cart = http.post( url_cart, body_cart_str, params ); + const response_checkout = http.post( + url_checkout, + body_checkout_str, + params + ); + + check( response_cart, { + 'cart shortcode set': ( r ) => r.status >= 200 && r.status < 300, + } ); + check( response_checkout, { + 'checkout shortcode set': ( r ) => + r.status >= 200 && r.status < 300, + } ); + } + + setDefaultHeaders(); + + listWPPages(); + + findCartCheckoutPage(); + + convertToCartCheckoutShortcode(); +} diff --git a/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js b/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js index cce8e7b80e4..c06aed22d2b 100644 --- a/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js +++ b/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js @@ -22,6 +22,7 @@ import { ordersFilter } from '../requests/merchant/orders-filter.js'; import { addOrder } from '../requests/merchant/add-order.js'; import { ordersAPI } from '../requests/api/orders.js'; import { homeWCAdmin } from '../requests/merchant/home-wc-admin.js'; +import { useCartCheckoutShortcodes } from '../setup/cart-checkout-shortcode.js'; const shopper_request_threshold = 'p(95)<10000'; const merchant_request_threshold = 'p(95)<10000'; @@ -248,6 +249,10 @@ export const options = { }, }; +export function setup() { + useCartCheckoutShortcodes(); +} + export function shopperBrowseFlow() { homePage(); shopPage(); diff --git a/plugins/woocommerce/tests/php/includes/settings/class-wc-settings-advanced-test.php b/plugins/woocommerce/tests/php/includes/settings/class-wc-settings-advanced-test.php index 86894c188ae..81233fe1f03 100644 --- a/plugins/woocommerce/tests/php/includes/settings/class-wc-settings-advanced-test.php +++ b/plugins/woocommerce/tests/php/includes/settings/class-wc-settings-advanced-test.php @@ -117,38 +117,6 @@ class WC_Settings_Advanced_Test extends WC_Settings_Unit_Test_Case { $this->assertEquals( $expected, $settings_ids_and_types ); } - /** - * @testdox get_settings('') should take the cart page id from the woocommerce_cart_shortcode_tag filter. - */ - public function test_get_default_settings_takes_cart_page_id_from_filter() { - $original_id = null; - - add_filter( - 'woocommerce_cart_shortcode_tag', - function ( $id ) use ( &$original_id ) { - $original_id = $id; - return 'foobar'; - }, - 10, - 1 - ); - - $sut = new WC_Settings_Advanced(); - $settings = $sut->get_settings_for_section( '' ); - $setting = current( - array_filter( - $settings, - function( $value ) { - return 'woocommerce_cart_page_id' === $value['id']; - } - ) - ); - $actual_setting_desc = $setting['desc']; - - $this->assertEquals( 'woocommerce_cart', $original_id ); - $this->assertEquals( 'Page contents: [foobar]', $actual_setting_desc ); - } - /** * @testdox get_settings('woocommerce_com') should return all the settings for the woocommerce_com section. */ diff --git a/plugins/woocommerce/woocommerce.php b/plugins/woocommerce/woocommerce.php index c92a3d451b8..b53284f1833 100644 --- a/plugins/woocommerce/woocommerce.php +++ b/plugins/woocommerce/woocommerce.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce * Plugin URI: https://woocommerce.com/ * Description: An eCommerce toolkit that helps you sell anything. Beautifully. - * Version: 8.3.0-dev + * Version: 8.4.0-dev * Author: Automattic * Author URI: https://woocommerce.com * Text Domain: woocommerce diff --git a/tools/monorepo-utils/src/changefile/lib/github.ts b/tools/monorepo-utils/src/changefile/lib/github.ts index c42943bcee9..987d7d1c42c 100644 --- a/tools/monorepo-utils/src/changefile/lib/github.ts +++ b/tools/monorepo-utils/src/changefile/lib/github.ts @@ -22,7 +22,7 @@ export const getPullRequestData = async ( const isCommunityPR = isCommunityPullRequest( prData, owner, name ); const headOwner = isCommunityPR ? prData.head.repo.owner.login : owner; const branch = prData.head.ref; - const fileName = branch.replace( /\//g, '-' ); + const fileName = `${ prNumber }-${ branch.replace( /\//g, '-' ) }`; const prBody = prData.body; const head = prData.head.sha; const base = prData.base.sha;