diff --git a/docs/docs-manifest.json b/docs/docs-manifest.json
index 360754af0a1..f9202494110 100644
--- a/docs/docs-manifest.json
+++ b/docs/docs-manifest.json
@@ -691,7 +691,7 @@
"post_title": "Integrating with coming soon mode",
"tags": "how-to, coming-soon",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/extension-development/integrating-coming-soon-mode.md",
- "hash": "910dbbab77c6fb4735e7704796242c38d86f3bf3b897de1075338eb47194f8f5",
+ "hash": "8c2087952ae79bb4c3e3977c57d9e933fcfaa418a5bc643b3827059daa5879a7",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/extension-development/integrating-coming-soon-mode.md",
"id": "787743efb6ef0ad509b17735eaf58b2a9a08afbc"
},
@@ -1804,5 +1804,5 @@
"categories": []
}
],
- "hash": "12e9abfbcdbeae7dd5cc12dc3af3818332f272cb4b3ad12993cc010299009013"
+ "hash": "8199f0d3c854474839300ed606f03f9f286ace35f65d7c47ffc6477762eaf51e"
}
\ No newline at end of file
diff --git a/docs/extension-development/integrating-coming-soon-mode.md b/docs/extension-development/integrating-coming-soon-mode.md
index 18367bbceb9..c34fe9d1ae3 100644
--- a/docs/extension-development/integrating-coming-soon-mode.md
+++ b/docs/extension-development/integrating-coming-soon-mode.md
@@ -3,7 +3,7 @@ post_title: Integrating with coming soon mode
tags: how-to, coming-soon
---
-This guide provides examples for third-party developers and hosting providers on how to integrate their systems with WooCommerce's coming soon mode. For more details, please read the [developer blog post](https://developer.woocommerce.com/2024/06/18/introducing-coming-soon-mode/).
+This guide provides examples for third-party developers and hosting providers on how to integrate their systems with WooCommerce's coming soon mode. For more details, please read the [developer blog post](https://developer.woocommerce.com/2024/06/18/introducing-coming-soon-mode/). For site visibility settings, please refer to the [admin documentation](https://woocommerce.com/document/configuring-woocommerce-settings/coming-soon-mode/).
## Introduction
@@ -49,8 +49,8 @@ function sync_coming_soon_to_other_plugins( $old_value, $new_value, $option ) {
$is_enabled = $new_value === 'yes';
// Implement your logic to sync coming soon status.
- if ( function_exists( 'set_your_plugin_status' ) ) {
- set_your_plugin_status( $is_enabled );
+ if ( function_exists( 'your_plugin_set_coming_soon' ) ) {
+ your_plugin_set_coming_soon( $is_enabled );
}
}
```
@@ -84,8 +84,8 @@ function sync_coming_soon_to_other_plugins( $old_value, $new_value, $option ) {
$is_enabled = $new_value === 'yes';
// Implement your logic to sync coming soon status.
- if ( function_exists( 'set_your_plugin_status' ) ) {
- set_your_plugin_status( $is_enabled );
+ if ( function_exists( 'your_plugin_set_coming_soon' ) ) {
+ your_plugin_set_coming_soon( $is_enabled );
}
}
@@ -108,6 +108,38 @@ function sync_coming_soon_from_other_plugins( $is_enabled ) {
}
```
+#### One-way binding with option override
+
+We could also programmatically bind the coming soon option from another plugin by overriding the `woocommerce_coming_soon` option. This is advantageous since it simplifies state management and prevents possible out-of-sync issues.
+
+In the following example, we're binding the coming soon option from another plugin by overriding the `woocommerce_coming_soon` option.
+
+```php
+add_filter( 'pre_option_woocommerce_coming_soon', 'override_option_woocommerce_coming_soon' );
+
+function override_option_woocommerce_coming_soon( $current_value ) {
+ // Implement your logic to sync coming soon status.
+ if ( function_exists( 'your_plugin_is_coming_soon' ) ) {
+ return your_plugin_is_coming_soon() ? 'yes' : 'no';
+ }
+ return $current_value;
+}
+
+add_filter( 'pre_update_option_woocommerce_coming_soon', 'override_update_woocommerce_coming_soon', 10, 2 );
+
+function override_update_woocommerce_coming_soon( $new_value, $old_value ) {
+ // Check user capability.
+ if ( ! current_user_can( 'manage_options' ) ) {
+ wp_die( 'You do not have sufficient permissions to access this page.' );
+ }
+
+ // Implement your logic to sync coming soon status.
+ if ( function_exists( 'your_plugin_set_coming_soon' ) ) {
+ your_plugin_set_coming_soon( $new_value === 'yes' );
+ }
+}
+```
+
### Custom exclusions filter
It is possible for developers to add custom exclusions that bypass the coming soon protection. This is useful for exclusions like always bypassing the screen on a specific IP address, or making a specific landing page available.
@@ -134,3 +166,35 @@ add_filter( 'woocommerce_coming_soon_exclude', function( $is_excluded ) {
return $is_excluded;
}, 10 );
```
+
+#### Custom share links
+
+The following example shows how to integrate with a custom share code. We recommend using cookies or other storage to persist the access when users navigate across the site:
+
+```php
+add_filter( 'woocommerce_coming_soon_exclude', function( $exclude ) {
+ // Implement your logic to get and validate share code.
+ if ( function_exists( 'your_plugin_get_share_code' ) && function_exists( 'your_plugin_is_valid_share_code' ) ) {
+ $share_code = your_plugin_get_share_code();
+ if ( your_plugin_is_valid_share_code( $share_code ) ) {
+ return true;
+ }
+ }
+
+ return $exclude;
+} );
+```
+
+### Extend "Apply to store pages only" setting
+
+When using the `Apply to store pages only` setting, you may want to add a custom page to the list of store pages which will be restricted by coming soon mode. You can use the following example to add a custom page:
+
+```php
+add_filter( 'woocommerce_store_pages', function( $pages ) {
+ $page = get_page_by_path( 'your-page-slug' );
+ if ( $page ) {
+ $pages[] = $page->ID;
+ }
+ return $pages;
+} );
+```
diff --git a/packages/js/components/changelog/upgrade-storybook_and_add_pages_workflow b/packages/js/components/changelog/upgrade-storybook_and_add_pages_workflow
new file mode 100644
index 00000000000..579b91e0c80
--- /dev/null
+++ b/packages/js/components/changelog/upgrade-storybook_and_add_pages_workflow
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Update storybook file format in support with Storybook 7 story indexer.
diff --git a/packages/js/components/package.json b/packages/js/components/package.json
index 49781d18732..b57050f50c4 100644
--- a/packages/js/components/package.json
+++ b/packages/js/components/package.json
@@ -132,18 +132,10 @@
"devDependencies": {
"@babel/core": "^7.23.5",
"@babel/runtime": "^7.23.5",
- "@storybook/addon-actions": "6.5.17-alpha.0",
"@storybook/addon-console": "^1.2.3",
- "@storybook/addon-controls": "6.5.17-alpha.0",
- "@storybook/addon-docs": "6.5.17-alpha.0",
- "@storybook/addon-knobs": "^6.4.0",
- "@storybook/addon-links": "6.5.17-alpha.0",
- "@storybook/addons": "6.5.17-alpha.0",
- "@storybook/api": "6.5.17-alpha.0",
- "@storybook/components": "6.5.17-alpha.0",
- "@storybook/core-events": "6.5.17-alpha.0",
+ "@storybook/addon-docs": "7.6.19",
+ "@storybook/addon-links": "7.6.19",
"@storybook/react": "6.5.17-alpha.0",
- "@storybook/theming": "6.5.17-alpha.0",
"@testing-library/dom": "8.11.3",
"@testing-library/jest-dom": "5.16.2",
"@testing-library/react": "12.1.3",
diff --git a/packages/js/components/src/abbreviated-card/stories/index.js b/packages/js/components/src/abbreviated-card/stories/abbreviated-card.story.js
similarity index 100%
rename from packages/js/components/src/abbreviated-card/stories/index.js
rename to packages/js/components/src/abbreviated-card/stories/abbreviated-card.story.js
diff --git a/packages/js/components/src/advanced-filters/stories/index.js b/packages/js/components/src/advanced-filters/stories/advanced-filters.story.js
similarity index 100%
rename from packages/js/components/src/advanced-filters/stories/index.js
rename to packages/js/components/src/advanced-filters/stories/advanced-filters.story.js
diff --git a/packages/js/components/src/analytics/error/stories/index.tsx b/packages/js/components/src/analytics/error/stories/analytics-error.story.tsx
similarity index 100%
rename from packages/js/components/src/analytics/error/stories/index.tsx
rename to packages/js/components/src/analytics/error/stories/analytics-error.story.tsx
diff --git a/packages/js/components/src/animation-slider/stories/index.js b/packages/js/components/src/animation-slider/stories/animation-slider.story.js
similarity index 100%
rename from packages/js/components/src/animation-slider/stories/index.js
rename to packages/js/components/src/animation-slider/stories/animation-slider.story.js
diff --git a/packages/js/components/src/badge/stories/index.tsx b/packages/js/components/src/badge/stories/badge.story.tsx
similarity index 100%
rename from packages/js/components/src/badge/stories/index.tsx
rename to packages/js/components/src/badge/stories/badge.story.tsx
diff --git a/packages/js/components/src/calendar/stories/date-picker.js b/packages/js/components/src/calendar/stories/date-picker.story.js
similarity index 100%
rename from packages/js/components/src/calendar/stories/date-picker.js
rename to packages/js/components/src/calendar/stories/date-picker.story.js
diff --git a/packages/js/components/src/calendar/stories/date-range.js b/packages/js/components/src/calendar/stories/date-range.story.js
similarity index 100%
rename from packages/js/components/src/calendar/stories/date-range.js
rename to packages/js/components/src/calendar/stories/date-range.story.js
diff --git a/packages/js/components/src/chart/stories/index.js b/packages/js/components/src/chart/stories/chart.story.js
similarity index 100%
rename from packages/js/components/src/chart/stories/index.js
rename to packages/js/components/src/chart/stories/chart.story.js
diff --git a/packages/js/components/src/collapsible-content/stories/index.tsx b/packages/js/components/src/collapsible-content/stories/collapsible-content.story.tsx
similarity index 100%
rename from packages/js/components/src/collapsible-content/stories/index.tsx
rename to packages/js/components/src/collapsible-content/stories/collapsible-content.story.tsx
diff --git a/packages/js/components/src/compare-filter/stories/index.js b/packages/js/components/src/compare-filter/stories/compare-filter.story.js
similarity index 100%
rename from packages/js/components/src/compare-filter/stories/index.js
rename to packages/js/components/src/compare-filter/stories/compare-filter.story.js
diff --git a/packages/js/components/src/compare-filter/test/compare-filter.js b/packages/js/components/src/compare-filter/test/compare-filter.js
index 2980de4f4cd..18ab9b36057 100644
--- a/packages/js/components/src/compare-filter/test/compare-filter.js
+++ b/packages/js/components/src/compare-filter/test/compare-filter.js
@@ -7,7 +7,7 @@ import { createElement } from '@wordpress/element';
/**
* Internal dependencies
*/
-import { Basic } from '../stories/index';
+import { Basic } from '../stories/compare-filter.story';
import { CompareFilter } from '../index';
import Search from '../../search';
import productAutocompleter from '../../search/autocompleters/product';
diff --git a/packages/js/components/src/date-range-filter-picker/stories/index.js b/packages/js/components/src/date-range-filter-picker/stories/date-range-filter-picker.story.js
similarity index 100%
rename from packages/js/components/src/date-range-filter-picker/stories/index.js
rename to packages/js/components/src/date-range-filter-picker/stories/date-range-filter-picker.story.js
diff --git a/packages/js/components/src/date-time-picker-control/stories/index.tsx b/packages/js/components/src/date-time-picker-control/stories/date-time-picker-control.story.tsx
similarity index 100%
rename from packages/js/components/src/date-time-picker-control/stories/index.tsx
rename to packages/js/components/src/date-time-picker-control/stories/date-time-picker-control.story.tsx
diff --git a/packages/js/components/src/date/stories/index.js b/packages/js/components/src/date/stories/date.story.js
similarity index 100%
rename from packages/js/components/src/date/stories/index.js
rename to packages/js/components/src/date/stories/date.story.js
diff --git a/packages/js/components/src/dropdown-button/stories/index.js b/packages/js/components/src/dropdown-button/stories/index.story.js
similarity index 100%
rename from packages/js/components/src/dropdown-button/stories/index.js
rename to packages/js/components/src/dropdown-button/stories/index.story.js
diff --git a/packages/js/components/src/dynamic-form/stories/index.js b/packages/js/components/src/dynamic-form/stories/index.story.js
similarity index 100%
rename from packages/js/components/src/dynamic-form/stories/index.js
rename to packages/js/components/src/dynamic-form/stories/index.story.js
diff --git a/packages/js/components/src/ellipsis-menu/stories/index.js b/packages/js/components/src/ellipsis-menu/stories/ellipsis-menu.story.js
similarity index 100%
rename from packages/js/components/src/ellipsis-menu/stories/index.js
rename to packages/js/components/src/ellipsis-menu/stories/ellipsis-menu.story.js
diff --git a/packages/js/components/src/empty-content/stories/index.js b/packages/js/components/src/empty-content/stories/empty-content.story.js
similarity index 100%
rename from packages/js/components/src/empty-content/stories/index.js
rename to packages/js/components/src/empty-content/stories/empty-content.story.js
diff --git a/packages/js/components/src/error-boundary/stories/index.tsx b/packages/js/components/src/error-boundary/stories/error-boundary.story.tsx
similarity index 100%
rename from packages/js/components/src/error-boundary/stories/index.tsx
rename to packages/js/components/src/error-boundary/stories/error-boundary.story.tsx
diff --git a/packages/js/components/src/experimental-select-control/stories/index.tsx b/packages/js/components/src/experimental-select-control/stories/select-control.story.tsx
similarity index 100%
rename from packages/js/components/src/experimental-select-control/stories/index.tsx
rename to packages/js/components/src/experimental-select-control/stories/select-control.story.tsx
diff --git a/packages/js/components/src/experimental-select-tree-control/stories/index.tsx b/packages/js/components/src/experimental-select-tree-control/stories/select-tree-control.story.tsx
similarity index 100%
rename from packages/js/components/src/experimental-select-tree-control/stories/index.tsx
rename to packages/js/components/src/experimental-select-tree-control/stories/select-tree-control.story.tsx
diff --git a/packages/js/components/src/experimental-tree-control/stories/index.tsx b/packages/js/components/src/experimental-tree-control/stories/tree-control.story.tsx
similarity index 100%
rename from packages/js/components/src/experimental-tree-control/stories/index.tsx
rename to packages/js/components/src/experimental-tree-control/stories/tree-control.story.tsx
diff --git a/packages/js/components/src/filter-picker/stories/index.js b/packages/js/components/src/filter-picker/stories/filter-picker.story.js
similarity index 100%
rename from packages/js/components/src/filter-picker/stories/index.js
rename to packages/js/components/src/filter-picker/stories/filter-picker.story.js
diff --git a/packages/js/components/src/filter-picker/test/index.js b/packages/js/components/src/filter-picker/test/index.js
index 62d024f199f..a6ac33837ee 100644
--- a/packages/js/components/src/filter-picker/test/index.js
+++ b/packages/js/components/src/filter-picker/test/index.js
@@ -8,7 +8,7 @@ import { createElement } from '@wordpress/element';
/**
* Internal dependencies
*/
-import { Basic } from '../stories/index';
+import { Basic } from '../stories/filter-picker.story';
import FilterPicker from '../index';
import Search from '../../search';
import productAutocompleter from '../../search/autocompleters/product';
diff --git a/packages/js/components/src/filters/stories/index.js b/packages/js/components/src/filters/stories/filters.story.js
similarity index 100%
rename from packages/js/components/src/filters/stories/index.js
rename to packages/js/components/src/filters/stories/filters.story.js
diff --git a/packages/js/components/src/flag/stories/index.js b/packages/js/components/src/flag/stories/flag.story.js
similarity index 100%
rename from packages/js/components/src/flag/stories/index.js
rename to packages/js/components/src/flag/stories/flag.story.js
diff --git a/packages/js/components/src/form-section/stories/index.tsx b/packages/js/components/src/form-section/stories/form-section.story.tsx
similarity index 100%
rename from packages/js/components/src/form-section/stories/index.tsx
rename to packages/js/components/src/form-section/stories/form-section.story.tsx
diff --git a/packages/js/components/src/form/stories/index.js b/packages/js/components/src/form/stories/form.story.js
similarity index 100%
rename from packages/js/components/src/form/stories/index.js
rename to packages/js/components/src/form/stories/form.story.js
diff --git a/packages/js/components/src/image-gallery/stories/index.tsx b/packages/js/components/src/image-gallery/stories/image-gallery.story.tsx
similarity index 96%
rename from packages/js/components/src/image-gallery/stories/index.tsx
rename to packages/js/components/src/image-gallery/stories/image-gallery.story.tsx
index 82cd856c0ee..6481ef732d6 100644
--- a/packages/js/components/src/image-gallery/stories/index.tsx
+++ b/packages/js/components/src/image-gallery/stories/image-gallery.story.tsx
@@ -8,7 +8,7 @@ import React from 'react';
* Internal dependencies
*/
import { ImageGallery, ImageGalleryItem } from '../';
-import { MockMediaUpload } from '../../media-uploader/stories/index.tsx';
+import { MockMediaUpload } from '../../media-uploader/stories/mock-media-uploader';
export const Basic: React.FC = () => {
return (
diff --git a/packages/js/components/src/image-upload/stories/index.js b/packages/js/components/src/image-upload/stories/image-upload.story.js
similarity index 100%
rename from packages/js/components/src/image-upload/stories/index.js
rename to packages/js/components/src/image-upload/stories/image-upload.story.js
diff --git a/packages/js/components/src/link/stories/index.tsx b/packages/js/components/src/link/stories/link.story.tsx
similarity index 100%
rename from packages/js/components/src/link/stories/index.tsx
rename to packages/js/components/src/link/stories/link.story.tsx
diff --git a/packages/js/components/src/list-item/stories/index.tsx b/packages/js/components/src/list-item/stories/list-item.story.tsx
similarity index 100%
rename from packages/js/components/src/list-item/stories/index.tsx
rename to packages/js/components/src/list-item/stories/list-item.story.tsx
diff --git a/packages/js/components/src/list/stories/index.js b/packages/js/components/src/list/stories/list.story.js
similarity index 100%
rename from packages/js/components/src/list/stories/index.js
rename to packages/js/components/src/list/stories/list.story.js
diff --git a/packages/js/components/src/media-uploader/stories/index.tsx b/packages/js/components/src/media-uploader/stories/media-uploader.story.tsx
similarity index 76%
rename from packages/js/components/src/media-uploader/stories/index.tsx
rename to packages/js/components/src/media-uploader/stories/media-uploader.story.tsx
index 9f83de937f9..b0ddb24e79f 100644
--- a/packages/js/components/src/media-uploader/stories/index.tsx
+++ b/packages/js/components/src/media-uploader/stories/media-uploader.story.tsx
@@ -2,7 +2,7 @@
* External dependencies
*/
import React, { createElement } from 'react';
-import { Modal, Notice } from '@wordpress/components';
+import { Notice } from '@wordpress/components';
import { MediaItem } from '@wordpress/media-utils';
import { useState } from '@wordpress/element';
import { cloudUpload } from '@wordpress/icons';
@@ -12,59 +12,7 @@ import { cloudUpload } from '@wordpress/icons';
*/
import { MediaUploader } from '../';
import { File } from '../types';
-
-const MockMediaUpload = ( { onSelect, render } ) => {
- const [ isOpen, setOpen ] = useState( false );
-
- return (
- <>
- { render( {
- open: () => setOpen( true ),
- } ) }
- { isOpen && (
- {
- setOpen( false );
- event.stopPropagation();
- } }
- >
-
- Use the default built-in{ ' ' }
- MediaUploadComponent
prop to render the WP
- Media Modal.
-
- { Array( ...Array( 3 ) ).map( ( n, i ) => {
- return (
-
- );
- } ) }
-
- ) }
- >
- );
-};
+import { MockMediaUpload } from './mock-media-uploader';
const ImageGallery = ( { images }: { images: File[] } ) => {
return (
diff --git a/packages/js/components/src/media-uploader/stories/mock-media-uploader.tsx b/packages/js/components/src/media-uploader/stories/mock-media-uploader.tsx
new file mode 100644
index 00000000000..a31460877f5
--- /dev/null
+++ b/packages/js/components/src/media-uploader/stories/mock-media-uploader.tsx
@@ -0,0 +1,59 @@
+/**
+ * External dependencies
+ */
+import React, { createElement } from 'react';
+import { Modal } from '@wordpress/components';
+import { useState } from '@wordpress/element';
+
+export const MockMediaUpload = ( { onSelect, render } ) => {
+ const [ isOpen, setOpen ] = useState( false );
+
+ return (
+ <>
+ { render( {
+ open: () => setOpen( true ),
+ } ) }
+ { isOpen && (
+ {
+ setOpen( false );
+ event.stopPropagation();
+ } }
+ >
+
+ Use the default built-in{ ' ' }
+ MediaUploadComponent
prop to render the WP
+ Media Modal.
+
+ { Array( ...Array( 3 ) ).map( ( n, i ) => {
+ return (
+
+ );
+ } ) }
+
+ ) }
+ >
+ );
+};
diff --git a/packages/js/components/src/order-status/stories/index.js b/packages/js/components/src/order-status/stories/order-status.story.js
similarity index 100%
rename from packages/js/components/src/order-status/stories/index.js
rename to packages/js/components/src/order-status/stories/order-status.story.js
diff --git a/packages/js/components/src/pagination/stories/index.js b/packages/js/components/src/pagination/stories/pagination.story.js
similarity index 100%
rename from packages/js/components/src/pagination/stories/index.js
rename to packages/js/components/src/pagination/stories/pagination.story.js
diff --git a/packages/js/components/src/phone-number-input/stories/index.tsx b/packages/js/components/src/phone-number-input/stories/phone-number-input.story.tsx
similarity index 100%
rename from packages/js/components/src/phone-number-input/stories/index.tsx
rename to packages/js/components/src/phone-number-input/stories/phone-number-input.story.tsx
diff --git a/packages/js/components/src/pill/stories/index.js b/packages/js/components/src/pill/stories/pill.story.js
similarity index 100%
rename from packages/js/components/src/pill/stories/index.js
rename to packages/js/components/src/pill/stories/pill.story.js
diff --git a/packages/js/components/src/plugins/index.tsx b/packages/js/components/src/plugins/index.tsx
index df2561ea28f..a330bc8cbd2 100644
--- a/packages/js/components/src/plugins/index.tsx
+++ b/packages/js/components/src/plugins/index.tsx
@@ -11,7 +11,12 @@ import {
} from '@wordpress/element';
import { SyntheticEvent, useCallback } from 'react';
import { useDispatch, useSelect } from '@wordpress/data';
-import { PLUGINS_STORE_NAME, InstallPluginsResponse } from '@woocommerce/data';
+import { PLUGINS_STORE_NAME } from '@woocommerce/data';
+import type {
+ InstallPluginsResponse,
+ PluginSelectors,
+ PluginActions,
+} from '@woocommerce/data';
type PluginsProps = {
onComplete: (
@@ -52,10 +57,14 @@ export const Plugins = ( {
const [ hasErrors, setHasErrors ] = useState( false );
// Tracks action so that multiple instances of this button don't all light up when one is clicked
const [ hasBeenClicked, setHasBeenClicked ] = useState( false );
- const { installAndActivatePlugins } = useDispatch( PLUGINS_STORE_NAME );
+ const { installAndActivatePlugins }: PluginActions =
+ useDispatch( PLUGINS_STORE_NAME );
const { isRequesting } = useSelect( ( select ) => {
- const { getActivePlugins, getInstalledPlugins, isPluginsRequesting } =
- select( PLUGINS_STORE_NAME );
+ const {
+ getActivePlugins,
+ getInstalledPlugins,
+ isPluginsRequesting,
+ }: PluginSelectors = select( PLUGINS_STORE_NAME );
return {
isRequesting:
@@ -64,7 +73,7 @@ export const Plugins = ( {
activePlugins: getActivePlugins(),
installedPlugins: getInstalledPlugins(),
};
- } );
+ }, [] );
const handleErrors = useCallback(
( errors: unknown, response: InstallPluginsResponse ) => {
diff --git a/packages/js/components/src/plugins/test/index.js b/packages/js/components/src/plugins/test/index.js
index 1aad94cd6d6..30c3f4f41cd 100644
--- a/packages/js/components/src/plugins/test/index.js
+++ b/packages/js/components/src/plugins/test/index.js
@@ -13,7 +13,7 @@ import { useDispatch } from '@wordpress/data';
import { Plugins } from '../index';
jest.mock( '@wordpress/data', () => ( {
- ...jest.requireActual( '@wordpress/data' ),
+ __esModule: true,
useDispatch: jest
.fn()
.mockReturnValue( { installAndActivatePlugins: jest.fn() } ),
diff --git a/packages/js/components/src/product-fields/store/index.ts b/packages/js/components/src/product-fields/store/index.ts
index 9c53ed96870..95fb84fbccf 100644
--- a/packages/js/components/src/product-fields/store/index.ts
+++ b/packages/js/components/src/product-fields/store/index.ts
@@ -12,7 +12,6 @@ import * as actions from './actions';
import { STORE_NAME } from './constants';
export const store = createReduxStore( STORE_NAME, {
- // @ts-expect-error reducer has correct format.
reducer,
selectors,
actions,
diff --git a/packages/js/components/src/product-fields/store/types.ts b/packages/js/components/src/product-fields/store/types.ts
index ebab49c0509..1b48e9ca1f5 100644
--- a/packages/js/components/src/product-fields/store/types.ts
+++ b/packages/js/components/src/product-fields/store/types.ts
@@ -8,6 +8,7 @@ export type ProductFieldDefinition = {
type?: HTMLInputTypeAttribute;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
render?: ComponentType;
+ attributes?: Record< string, string >;
};
export type ProductFieldState = {
diff --git a/packages/js/components/src/product-fields/stories/index.tsx b/packages/js/components/src/product-fields/stories/product-fields.story.tsx
similarity index 100%
rename from packages/js/components/src/product-fields/stories/index.tsx
rename to packages/js/components/src/product-fields/stories/product-fields.story.tsx
diff --git a/packages/js/components/src/product-image/stories/index.tsx b/packages/js/components/src/product-image/stories/product-image.story.tsx
similarity index 100%
rename from packages/js/components/src/product-image/stories/index.tsx
rename to packages/js/components/src/product-image/stories/product-image.story.tsx
diff --git a/packages/js/components/src/progress-bar/stories/index.tsx b/packages/js/components/src/progress-bar/stories/progress-bar.story.tsx
similarity index 100%
rename from packages/js/components/src/progress-bar/stories/index.tsx
rename to packages/js/components/src/progress-bar/stories/progress-bar.story.tsx
diff --git a/packages/js/components/src/rating/stories/index.tsx b/packages/js/components/src/rating/stories/rating.story.tsx
similarity index 100%
rename from packages/js/components/src/rating/stories/index.tsx
rename to packages/js/components/src/rating/stories/rating.story.tsx
diff --git a/packages/js/components/src/rich-text-editor/editor-writing-flow.tsx b/packages/js/components/src/rich-text-editor/editor-writing-flow.tsx
index 2726dc0cee8..1333a7f3c3c 100644
--- a/packages/js/components/src/rich-text-editor/editor-writing-flow.tsx
+++ b/packages/js/components/src/rich-text-editor/editor-writing-flow.tsx
@@ -43,7 +43,7 @@ export const EditorWritingFlow = ( {
editorMode: __unstableGetEditorMode(),
selectedBlockClientIds: getSelectedBlockClientIds(),
};
- } );
+ }, [] );
// This is a workaround to prevent focusing the block on initialization.
// Changing to a mode other than "edit" ensures that no initial position
diff --git a/packages/js/components/src/rich-text-editor/stories/index.tsx b/packages/js/components/src/rich-text-editor/stories/rich-text-editor.story.tsx
similarity index 100%
rename from packages/js/components/src/rich-text-editor/stories/index.tsx
rename to packages/js/components/src/rich-text-editor/stories/rich-text-editor.story.tsx
diff --git a/packages/js/components/src/scroll-to/stories/index.js b/packages/js/components/src/scroll-to/stories/scroll-to.story.js
similarity index 100%
rename from packages/js/components/src/scroll-to/stories/index.js
rename to packages/js/components/src/scroll-to/stories/scroll-to.story.js
diff --git a/packages/js/components/src/search-list-control/stories/index.js b/packages/js/components/src/search-list-control/stories/search-list-control.story.js
similarity index 100%
rename from packages/js/components/src/search-list-control/stories/index.js
rename to packages/js/components/src/search-list-control/stories/search-list-control.story.js
diff --git a/packages/js/components/src/search/stories/index.js b/packages/js/components/src/search/stories/search.story.js
similarity index 100%
rename from packages/js/components/src/search/stories/index.js
rename to packages/js/components/src/search/stories/search.story.js
diff --git a/packages/js/components/src/section-header/stories/index.js b/packages/js/components/src/section-header/stories/section-header.story.js
similarity index 100%
rename from packages/js/components/src/section-header/stories/index.js
rename to packages/js/components/src/section-header/stories/section-header.story.js
diff --git a/packages/js/components/src/section/stories/index.tsx b/packages/js/components/src/section/stories/section.story.tsx
similarity index 100%
rename from packages/js/components/src/section/stories/index.tsx
rename to packages/js/components/src/section/stories/section.story.tsx
diff --git a/packages/js/components/src/segmented-selection/stories/index.js b/packages/js/components/src/segmented-selection/stories/segmented-selection.story.js
similarity index 100%
rename from packages/js/components/src/segmented-selection/stories/index.js
rename to packages/js/components/src/segmented-selection/stories/segmented-selection.story.js
diff --git a/packages/js/components/src/select-control/stories/index.tsx b/packages/js/components/src/select-control/stories/select-control.story.tsx
similarity index 100%
rename from packages/js/components/src/select-control/stories/index.tsx
rename to packages/js/components/src/select-control/stories/select-control.story.tsx
diff --git a/packages/js/components/src/sortable/stories/index.tsx b/packages/js/components/src/sortable/stories/sortable.story.tsx
similarity index 100%
rename from packages/js/components/src/sortable/stories/index.tsx
rename to packages/js/components/src/sortable/stories/sortable.story.tsx
diff --git a/packages/js/components/src/spinner/stories/index.js b/packages/js/components/src/spinner/stories/spinner.story.js
similarity index 100%
rename from packages/js/components/src/spinner/stories/index.js
rename to packages/js/components/src/spinner/stories/spinner.story.js
diff --git a/packages/js/components/src/stepper/stories/index.js b/packages/js/components/src/stepper/stories/stepper.story.js
similarity index 100%
rename from packages/js/components/src/stepper/stories/index.js
rename to packages/js/components/src/stepper/stories/stepper.story.js
diff --git a/packages/js/components/src/summary/stories/index.js b/packages/js/components/src/summary/stories/summary.story.js
similarity index 100%
rename from packages/js/components/src/summary/stories/index.js
rename to packages/js/components/src/summary/stories/summary.story.js
diff --git a/packages/js/components/src/table/stories/empty-table.tsx b/packages/js/components/src/table/stories/empty-table.story.tsx
similarity index 100%
rename from packages/js/components/src/table/stories/empty-table.tsx
rename to packages/js/components/src/table/stories/empty-table.story.tsx
diff --git a/packages/js/components/src/table/stories/table-card.tsx b/packages/js/components/src/table/stories/table-card.story.tsx
similarity index 100%
rename from packages/js/components/src/table/stories/table-card.tsx
rename to packages/js/components/src/table/stories/table-card.story.tsx
diff --git a/packages/js/components/src/table/stories/table-placeholder.tsx b/packages/js/components/src/table/stories/table-placeholder.story.tsx
similarity index 100%
rename from packages/js/components/src/table/stories/table-placeholder.tsx
rename to packages/js/components/src/table/stories/table-placeholder.story.tsx
diff --git a/packages/js/components/src/table/stories/table-summary-placeholder.tsx b/packages/js/components/src/table/stories/table-summary-placeholder.story.tsx
similarity index 100%
rename from packages/js/components/src/table/stories/table-summary-placeholder.tsx
rename to packages/js/components/src/table/stories/table-summary-placeholder.story.tsx
diff --git a/packages/js/components/src/table/stories/table-summary.jsx b/packages/js/components/src/table/stories/table-summary.story.jsx
similarity index 100%
rename from packages/js/components/src/table/stories/table-summary.jsx
rename to packages/js/components/src/table/stories/table-summary.story.jsx
diff --git a/packages/js/components/src/table/stories/table.tsx b/packages/js/components/src/table/stories/table.story.tsx
similarity index 100%
rename from packages/js/components/src/table/stories/table.tsx
rename to packages/js/components/src/table/stories/table.story.tsx
diff --git a/packages/js/components/src/tag/stories/index.tsx b/packages/js/components/src/tag/stories/tag.story.tsx
similarity index 100%
rename from packages/js/components/src/tag/stories/index.tsx
rename to packages/js/components/src/tag/stories/tag.story.tsx
diff --git a/packages/js/components/src/text-control-with-affixes/stories/index.js b/packages/js/components/src/text-control-with-affixes/stories/text-control-with-affixes.story.js
similarity index 100%
rename from packages/js/components/src/text-control-with-affixes/stories/index.js
rename to packages/js/components/src/text-control-with-affixes/stories/text-control-with-affixes.story.js
diff --git a/packages/js/components/src/text-control/stories/index.js b/packages/js/components/src/text-control/stories/text-control.story.js
similarity index 100%
rename from packages/js/components/src/text-control/stories/index.js
rename to packages/js/components/src/text-control/stories/text-control.story.js
diff --git a/packages/js/components/src/timeline/stories/index.js b/packages/js/components/src/timeline/stories/index.js
deleted file mode 100644
index a995ea3fd18..00000000000
--- a/packages/js/components/src/timeline/stories/index.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * External dependencies
- */
-import { date, text } from '@storybook/addon-knobs';
-import GridIcon from 'gridicons';
-
-/**
- * Internal dependencies
- */
-import Timeline, { orderByOptions } from '../';
-
-export default {
- title: 'WooCommerce Admin/components/Timeline',
- component: Timeline,
-};
-
-export const Empty = () => ;
-
-const itemDate = ( label, value ) => {
- const d = date( label, value );
- return new Date( d );
-};
-
-export const Filled = () => (
-
- { text( 'event 1, first event', 'p element in body' ) }
-
,
- text( 'event 1, second event', 'string in body' ),
- ],
- headline: (
- { text( 'event 1, headline', 'p tag in headline' ) }
- ),
- icon: (
-
- ),
- hideTimestamp: true,
- },
- {
- date: itemDate(
- 'event 2 date',
- new Date( 2020, 0, 20, 23, 45 )
- ),
- body: [],
- headline: (
-
- { text( 'event 2, headline', 'span in headline' ) }
-
- ),
- icon: (
-
- ),
- },
- {
- date: itemDate(
- 'event 3 date',
- new Date( 2020, 0, 22, 15, 13 )
- ),
- body: [
-
- { text( 'event 3, second event', 'span in body' ) }
- ,
- ],
- headline: text( 'event 3, headline', 'string in headline' ),
- icon: (
-
- ),
- },
- {
- date: itemDate(
- 'event 4 date',
- new Date( 2020, 0, 17, 1, 45 )
- ),
- headline: text(
- 'event 4, headline',
- 'undefined body and string headline'
- ),
- icon: (
-
- ),
- },
- ] }
- />
-);
diff --git a/packages/js/components/src/timeline/stories/timeline.story.js b/packages/js/components/src/timeline/stories/timeline.story.js
new file mode 100644
index 00000000000..3efe17fd676
--- /dev/null
+++ b/packages/js/components/src/timeline/stories/timeline.story.js
@@ -0,0 +1,71 @@
+/**
+ * External dependencies
+ */
+import GridIcon from 'gridicons';
+
+/**
+ * Internal dependencies
+ */
+import Timeline, { orderByOptions } from '../';
+
+export const Filled = () => {
+ return (
+ p element in body,
+ 'string in body',
+ ],
+ headline: p tag in headline
,
+ icon: (
+
+ ),
+ hideTimestamp: true,
+ },
+ {
+ date: new Date( 2020, 0, 20, 23, 45 ),
+ body: [],
+ headline: span in headline,
+ icon: (
+
+ ),
+ },
+ {
+ date: new Date( 2020, 0, 22, 15, 13 ),
+ body: [ span in body ],
+ headline: 'string in headline',
+ icon: (
+
+ ),
+ },
+ {
+ date: new Date( 2020, 0, 17, 1, 45 ),
+ headline: 'undefined body and string headline',
+ icon: ,
+ },
+ ] }
+ />
+ );
+};
+
+export default {
+ title: 'WooCommerce Admin/components/Timeline',
+ component: Filled,
+};
+
+export const Empty = () => ;
diff --git a/packages/js/components/src/tooltip/stories/index.tsx b/packages/js/components/src/tooltip/stories/tooltip.story.tsx
similarity index 100%
rename from packages/js/components/src/tooltip/stories/index.tsx
rename to packages/js/components/src/tooltip/stories/tooltip.story.tsx
diff --git a/packages/js/components/src/tour-kit/stories/index.tsx b/packages/js/components/src/tour-kit/stories/tour-kit.story.tsx
similarity index 100%
rename from packages/js/components/src/tour-kit/stories/index.tsx
rename to packages/js/components/src/tour-kit/stories/tour-kit.story.tsx
diff --git a/packages/js/components/src/tree-select-control/stories/index.js b/packages/js/components/src/tree-select-control/stories/tree-select-control.story.js
similarity index 100%
rename from packages/js/components/src/tree-select-control/stories/index.js
rename to packages/js/components/src/tree-select-control/stories/tree-select-control.story.js
diff --git a/packages/js/components/src/view-more-list/stories/index.js b/packages/js/components/src/view-more-list/stories/view-more-list.story.js
similarity index 100%
rename from packages/js/components/src/view-more-list/stories/index.js
rename to packages/js/components/src/view-more-list/stories/view-more-list.story.js
diff --git a/packages/js/components/src/web-preview/stories/index.js b/packages/js/components/src/web-preview/stories/web-preview.story.js
similarity index 100%
rename from packages/js/components/src/web-preview/stories/index.js
rename to packages/js/components/src/web-preview/stories/web-preview.story.js
diff --git a/packages/js/data/changelog/update-51103-woopayments-incentive-to-tracks-props b/packages/js/data/changelog/update-51103-woopayments-incentive-to-tracks-props
new file mode 100644
index 00000000000..c0d87293d0e
--- /dev/null
+++ b/packages/js/data/changelog/update-51103-woopayments-incentive-to-tracks-props
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Add wooPaymentsIncentiveId to the TaskType additionalData.
diff --git a/packages/js/data/changelog/upgrade-storybook_and_add_pages_workflow b/packages/js/data/changelog/upgrade-storybook_and_add_pages_workflow
new file mode 100644
index 00000000000..f6bdc7a7044
--- /dev/null
+++ b/packages/js/data/changelog/upgrade-storybook_and_add_pages_workflow
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Export plugin related data store types for selectors and actions.
diff --git a/packages/js/data/src/index.ts b/packages/js/data/src/index.ts
index 266c103813a..9b75260376a 100644
--- a/packages/js/data/src/index.ts
+++ b/packages/js/data/src/index.ts
@@ -85,6 +85,8 @@ export {
} from './product-form/types';
export * from './onboarding/types';
export * from './plugins/types';
+export { PluginSelectors } from './plugins/selectors';
+export { ActionDispatchers as PluginActions } from './plugins/actions';
export * from './products/types';
export type {
PartialProductVariation,
diff --git a/packages/js/data/src/onboarding/types.ts b/packages/js/data/src/onboarding/types.ts
index a39fa627e63..7e3e3058c73 100644
--- a/packages/js/data/src/onboarding/types.ts
+++ b/packages/js/data/src/onboarding/types.ts
@@ -35,6 +35,7 @@ export type TaskType = {
stripeTaxActivated?: boolean;
woocommerceTaxActivated?: boolean;
woocommerceShippingActivated?: boolean;
+ wooPaymentsIncentiveId?: string;
};
// Possibly added in DeprecatedTasks.mergeDeprecatedCallbackFunctions
isDeprecated?: boolean;
diff --git a/packages/js/e2e-utils/README.md b/packages/js/e2e-utils/README.md
index 12c9abe07ec..93f898daf37 100644
--- a/packages/js/e2e-utils/README.md
+++ b/packages/js/e2e-utils/README.md
@@ -12,7 +12,8 @@ npm install @woocommerce/e2e-utils --save
## Usage
Example:
-~~~js
+
+```js
import {
shopper,
merchant,
@@ -29,7 +30,7 @@ describe( 'Cart page', () => {
await expect( page ).toMatchElement( '.cart-empty', { text: 'Your cart is currently empty.' } );
} );
} );
-~~~
+```
### Retries
@@ -86,7 +87,6 @@ This package provides support for enabling retries in tests:
|----------|-------------|------------|
| `addDownloadableProductPermission` | `productName` | Add a downloadable permission for product in order |
| `collapseAdminMenu` | `collapse` | Collapse or expand the WP admin menu |
-| `dismissOnboardingWizard` | | Dismiss the onboarding wizard if present |
| `goToOrder` | `orderId` | Go to view a single order |
| `goToProduct` | `productId` | Go to view a single product |
| `login` | | Log in as merchant |
@@ -100,7 +100,6 @@ This package provides support for enabling retries in tests:
| `openPermalinkSettings` | | Go to Settings -> Permalinks |
| `openPlugins` | | Go to the Plugins screen |
| `openSettings` | | Go to WooCommerce -> Settings |
-| `runSetupWizard` | | Open the onboarding profiler |
| `updateOrderStatus` | `orderId, status` | Update the status of an order |
| `openEmailLog` | | Open the WP Mail Log page |
| `openAnalyticsPage` | | Open any Analytics page |
@@ -210,7 +209,6 @@ There is a general utilities object `utils` with the following functions:
| `clickFilter` | `selector` | helper method that clicks on a list page filter |
| `clickTab` | `tabName` | Click on a WooCommerce -> Settings tab |
| `clickUpdateOrder` | `noticeText`, `waitForSave` | Helper method to click the Update button on the order details page |
-| `completeOnboardingWizard` | | completes the onboarding wizard with some default settings |
| `createCoupon` | `couponAmount`, `couponType` | creates a basic coupon. Default amount is 5. Default coupon type is fixed discount. Returns the generated coupon code. |
| `createGroupedProduct` | | creates a grouped product for the grouped product tests. Returns the product id. |
| `createSimpleDownloadableProduct` | `name, downloadLimit, downloadName, price` | Create a simple downloadable product |
diff --git a/packages/js/e2e-utils/changelog/cleanup-profiler-wizard b/packages/js/e2e-utils/changelog/cleanup-profiler-wizard
new file mode 100644
index 00000000000..8a55c777336
--- /dev/null
+++ b/packages/js/e2e-utils/changelog/cleanup-profiler-wizard
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Remove Profile Wizard releated utils
diff --git a/packages/js/e2e-utils/src/components.js b/packages/js/e2e-utils/src/components.js
index 911d8d51a54..b641c674869 100644
--- a/packages/js/e2e-utils/src/components.js
+++ b/packages/js/e2e-utils/src/components.js
@@ -60,151 +60,6 @@ const waitAndClickPrimary = async ( waitForNetworkIdle = true ) => {
await page.waitForNavigation( { waitUntil: 'networkidle0' } );
}
};
-/**
- * Complete onboarding wizard.
- */
-const completeOnboardingWizard = async () => {
- // Store Details section
- await merchant.runSetupWizard();
-
- // Fill store's address - first line
- await expect( page ).toFill(
- '#inspector-text-control-0',
- config.get( 'addresses.admin.store.addressfirstline' )
- );
-
- // Fill store's address - second line
- await expect( page ).toFill(
- '#inspector-text-control-1',
- config.get( 'addresses.admin.store.addresssecondline' )
- );
-
- // Fill country and state where the store is located
- await expect( page ).toFill(
- '.woocommerce-select-control__control-input',
- config.get( 'addresses.admin.store.countryandstate' )
- );
-
- // Fill the city where the store is located
- await expect( page ).toFill(
- '#inspector-text-control-2',
- config.get( 'addresses.admin.store.city' )
- );
-
- // Fill postcode of the store
- await expect( page ).toFill(
- '#inspector-text-control-3',
- config.get( 'addresses.admin.store.postcode' )
- );
-
- // Verify that checkbox next to "I'm setting up a store for a client" is not selected
- await verifyCheckboxIsUnset( '.components-checkbox-control__input' );
-
- // Wait for "Continue" button to become active
- await page.waitForSelector( 'button.is-primary:not(:disabled)' );
-
- // Click on "Continue" button to move to the next step
- await page.click( 'button.is-primary', { text: 'Continue' } );
-
- // Wait for usage tracking pop-up window to appear on a new site
- const usageTrackingHeader = await page.$(
- '.components-modal__header-heading'
- );
- if ( usageTrackingHeader ) {
- await expect( page ).toMatchElement(
- '.components-modal__header-heading',
- {
- text: 'Build a better WooCommerce',
- }
- );
-
- // Query for "No Thanks" buttons
- const continueButtons = await page.$$(
- '.woocommerce-usage-modal__actions button.is-secondary'
- );
- expect( continueButtons ).toHaveLength( 1 );
-
- await continueButtons[ 0 ].click();
- await expect( page ).toMatchElement(
- '.woocommerce-usage-modal__actions button.is-secondary.is-busy'
- );
- await expect( page ).not.toMatchElement(
- '.woocommerce-usage-modal__actions button.is-primary:disabled'
- );
- }
- await page.waitForNavigation( { waitUntil: 'networkidle0' } );
-
- // Industry section
-
- // Query for the industries checkboxes
- const industryCheckboxes = await page.$$(
- '.components-checkbox-control__input'
- );
- expect( industryCheckboxes ).toHaveLength( 8 );
-
- // Select all industries including "Other"
- for ( let i = 0; i < 8; i++ ) {
- await industryCheckboxes[ i ].click();
- }
-
- // Fill "Other" industry
- await expect( page ).toFill(
- '.components-text-control__input',
- config.get( 'onboardingwizard.industry' )
- );
-
- // Wait for "Continue" button to become active
- await waitAndClickPrimary();
-
- // Product types section
-
- // Query for the product types checkboxes
- const productTypesCheckboxes = await page.$$(
- '.components-checkbox-control__input'
- );
- expect( productTypesCheckboxes ).toHaveLength( 7 );
-
- // Select Physical and Downloadable products
- for ( let i = 1; i < 2; i++ ) {
- await productTypesCheckboxes[ i ].click();
- }
-
- // Wait for "Continue" button to become active
- await waitAndClickPrimary();
-
- // Business Details section
-
- // Temporarily add delay to reduce test flakiness
- await page.waitFor( 2000 );
-
- // Query for the s
- const selectControls = await page.$$( '.woocommerce-select-control' );
- expect( selectControls ).toHaveLength( 2 );
-
- // Fill the number of products you plan to sell
- await selectControls[ 0 ].click();
- await page.waitForSelector( '.woocommerce-select-control__control' );
- await expect( page ).toClick( '.woocommerce-select-control__option', {
- text: config.get( 'onboardingwizard.numberofproducts' ),
- } );
-
- // Fill currently selling elsewhere
- await selectControls[ 1 ].click();
- await page.waitForSelector( '.woocommerce-select-control__control' );
- await expect( page ).toClick( '.woocommerce-select-control__option', {
- text: config.get( 'onboardingwizard.sellingelsewhere' ),
- } );
-
- // Wait for "Continue" button to become active
- await waitAndClickPrimary( false );
-
- // Skip installing extensions
- await unsetCheckbox( '.components-checkbox-control__input' );
- await verifyCheckboxIsUnset( '.components-checkbox-control__input' );
- await waitAndClickPrimary();
-
- // End of onboarding wizard
-};
/**
* Create simple product.
@@ -668,7 +523,6 @@ const deleteAllShippingZones = async () => {
};
export {
- completeOnboardingWizard,
createSimpleProduct,
createVariableProduct,
createGroupedProduct,
diff --git a/packages/js/e2e-utils/src/flows/merchant.js b/packages/js/e2e-utils/src/flows/merchant.js
index d312ad64686..0bde1222503 100644
--- a/packages/js/e2e-utils/src/flows/merchant.js
+++ b/packages/js/e2e-utils/src/flows/merchant.js
@@ -31,8 +31,6 @@ const {
WP_ADMIN_NEW_PRODUCT,
WP_ADMIN_PERMALINK_SETTINGS,
WP_ADMIN_PLUGINS,
- WP_ADMIN_SETUP_WIZARD,
- WP_ADMIN_WC_HOME,
WP_ADMIN_WC_SETTINGS,
WP_ADMIN_WC_EXTENSIONS,
WP_ADMIN_WC_HELPER,
@@ -42,7 +40,6 @@ const {
WP_ADMIN_IMPORT_PRODUCTS,
WP_ADMIN_PLUGIN_INSTALL,
WP_ADMIN_WP_UPDATES,
- IS_RETEST_MODE,
} = require( './constants' );
const { getSlug, waitForTimeout } = require( './utils' );
@@ -83,7 +80,6 @@ const merchant = {
await Promise.all( [
page.click( 'input[type=submit]' ),
page.waitForNavigation( { waitUntil: 'networkidle0' } ),
- merchant.dismissOnboardingWizard(),
] );
},
@@ -173,15 +169,6 @@ const merchant = {
} );
},
- runSetupWizard: async () => {
- const setupWizard = IS_RETEST_MODE
- ? WP_ADMIN_SETUP_WIZARD
- : WP_ADMIN_WC_HOME;
- await page.goto( setupWizard, {
- waitUntil: 'networkidle0',
- } );
- },
-
goToOrder: async ( orderId ) => {
await page.goto( WP_ADMIN_SINGLE_CPT_VIEW( orderId ), {
waitUntil: 'networkidle0',
@@ -290,9 +277,10 @@ const merchant = {
revokeDownloadableProductPermission: async ( productName ) => {
// Revoke downloadable product permission
- const permission = await expect(
- page
- ).toMatchElement( 'div.wc-metabox > h3', { text: productName } );
+ const permission = await expect( page ).toMatchElement(
+ 'div.wc-metabox > h3',
+ { text: productName }
+ );
await expect( permission ).toClick( 'button.revoke_access' );
// Wait for auto save
@@ -625,10 +613,10 @@ const merchant = {
},
/* Uploads and activates a plugin located at the provided file path. This will also deactivate and delete the plugin if it exists.
- *
- * @param {string} pluginFilePath The location of the plugin zip file to upload.
- * @param {string} pluginName The name of the plugin. For example, `WooCommerce`.
- */
+ *
+ * @param {string} pluginFilePath The location of the plugin zip file to upload.
+ * @param {string} pluginName The name of the plugin. For example, `WooCommerce`.
+ */
uploadAndActivatePlugin: async ( pluginFilePath, pluginName ) => {
await merchant.openPlugins();
@@ -647,8 +635,7 @@ const merchant = {
await page.click( 'a.upload-view-toggle' );
await expect( page ).toMatchElement( 'p.install-help', {
- text:
- 'If you have a plugin in a .zip format, you may install or update it by uploading it here.',
+ text: 'If you have a plugin in a .zip format, you may install or update it by uploading it here.',
} );
const uploader = await page.$( 'input[type=file]' );
@@ -753,33 +740,6 @@ const merchant = {
}
},
- /**
- * Dismiss the onboarding wizard if it is open.
- */
- dismissOnboardingWizard: async () => {
- let waitForNav = false;
- const skipButton = await page.$(
- '.woocommerce-profile-wizard__footer-link'
- );
- if ( skipButton ) {
- await skipButton.click();
- waitForNav = true;
- }
-
- // Dismiss usage tracking pop-up window if it appears on a new site
- const usageTrackingHeader = await page.$(
- '.woocommerce-usage-modal button.is-secondary'
- );
- if ( usageTrackingHeader ) {
- await usageTrackingHeader.click();
- waitForNav = true;
- }
-
- if ( waitForNav ) {
- await page.waitForNavigation( { waitUntil: 'networkidle0' } );
- }
- },
-
/**
* Expand or collapse the WP admin menu.
*
diff --git a/packages/js/e2e-utils/src/old-flows.js b/packages/js/e2e-utils/src/old-flows.js
index 4afde090920..c59a7d6e74a 100644
--- a/packages/js/e2e-utils/src/old-flows.js
+++ b/packages/js/e2e-utils/src/old-flows.js
@@ -172,11 +172,6 @@ const StoreOwnerFlow = {
StoreOwnerFlowDeprecated();
await merchant.openSettings( tab, section );
},
-
- runSetupWizard: async () => {
- StoreOwnerFlowDeprecated();
- await merchant.runSetupWizard();
- },
};
export { CustomerFlow, StoreOwnerFlow };
diff --git a/packages/js/experimental/changelog/upgrade-storybook_and_add_pages_workflow b/packages/js/experimental/changelog/upgrade-storybook_and_add_pages_workflow
new file mode 100644
index 00000000000..579b91e0c80
--- /dev/null
+++ b/packages/js/experimental/changelog/upgrade-storybook_and_add_pages_workflow
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Update storybook file format in support with Storybook 7 story indexer.
diff --git a/packages/js/experimental/src/experimental-list/stories/index.tsx b/packages/js/experimental/src/experimental-list/stories/experimental-list.story.tsx
similarity index 100%
rename from packages/js/experimental/src/experimental-list/stories/index.tsx
rename to packages/js/experimental/src/experimental-list/stories/experimental-list.story.tsx
diff --git a/packages/js/experimental/src/vertical-css-transition/stories/index.tsx b/packages/js/experimental/src/vertical-css-transition/stories/vertical-css-transition.story.tsx
similarity index 100%
rename from packages/js/experimental/src/vertical-css-transition/stories/index.tsx
rename to packages/js/experimental/src/vertical-css-transition/stories/vertical-css-transition.story.tsx
diff --git a/packages/js/onboarding/changelog/upgrade-storybook_and_add_pages_workflow b/packages/js/onboarding/changelog/upgrade-storybook_and_add_pages_workflow
new file mode 100644
index 00000000000..579b91e0c80
--- /dev/null
+++ b/packages/js/onboarding/changelog/upgrade-storybook_and_add_pages_workflow
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Update storybook file format in support with Storybook 7 story indexer.
diff --git a/packages/js/onboarding/package.json b/packages/js/onboarding/package.json
index 0521b2f2163..98fd24eef18 100644
--- a/packages/js/onboarding/package.json
+++ b/packages/js/onboarding/package.json
@@ -71,7 +71,6 @@
},
"devDependencies": {
"@babel/core": "^7.23.5",
- "@storybook/addon-knobs": "^7.0.2",
"@testing-library/react": "12.1.3",
"@types/jest": "^27.5.2",
"@types/react": "^17.0.71",
diff --git a/packages/js/onboarding/src/components/Loader/stories/index.tsx b/packages/js/onboarding/src/components/Loader/stories/loader.story.tsx
similarity index 100%
rename from packages/js/onboarding/src/components/Loader/stories/index.tsx
rename to packages/js/onboarding/src/components/Loader/stories/loader.story.tsx
diff --git a/packages/js/product-editor/changelog/fix-style_conflicts b/packages/js/product-editor/changelog/fix-style_conflicts
new file mode 100644
index 00000000000..bd5d3c6d81c
--- /dev/null
+++ b/packages/js/product-editor/changelog/fix-style_conflicts
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Increase specificity of product data views styles to avoid conflicts.
diff --git a/packages/js/product-editor/changelog/upgrade-storybook_and_add_pages_workflow b/packages/js/product-editor/changelog/upgrade-storybook_and_add_pages_workflow
new file mode 100644
index 00000000000..579b91e0c80
--- /dev/null
+++ b/packages/js/product-editor/changelog/upgrade-storybook_and_add_pages_workflow
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Update storybook file format in support with Storybook 7 story indexer.
diff --git a/packages/js/product-editor/src/components/advice-card/stories/index.tsx b/packages/js/product-editor/src/components/advice-card/stories/advice-card.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/components/advice-card/stories/index.tsx
rename to packages/js/product-editor/src/components/advice-card/stories/advice-card.story.tsx
diff --git a/packages/js/product-editor/src/components/attribute-combobox-field/stories/index.tsx b/packages/js/product-editor/src/components/attribute-combobox-field/stories/attribute-combobox-field.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/components/attribute-combobox-field/stories/index.tsx
rename to packages/js/product-editor/src/components/attribute-combobox-field/stories/attribute-combobox-field.story.tsx
diff --git a/packages/js/product-editor/src/components/button-with-dropdown-menu/stories/index.tsx b/packages/js/product-editor/src/components/button-with-dropdown-menu/stories/button-with-dropdown-menu.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/components/button-with-dropdown-menu/stories/index.tsx
rename to packages/js/product-editor/src/components/button-with-dropdown-menu/stories/button-with-dropdown-menu.story.tsx
diff --git a/packages/js/product-editor/src/components/label/stories/index.tsx b/packages/js/product-editor/src/components/label/stories/label.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/components/label/stories/index.tsx
rename to packages/js/product-editor/src/components/label/stories/label.story.tsx
diff --git a/packages/js/product-editor/src/images/cash-register/stories/index.tsx b/packages/js/product-editor/src/images/cash-register/stories/cash-register.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/images/cash-register/stories/index.tsx
rename to packages/js/product-editor/src/images/cash-register/stories/cash-register.story.tsx
diff --git a/packages/js/product-editor/src/images/glasses/stories/index.tsx b/packages/js/product-editor/src/images/glasses/stories/glasses.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/images/glasses/stories/index.tsx
rename to packages/js/product-editor/src/images/glasses/stories/glasses.story.tsx
diff --git a/packages/js/product-editor/src/images/pants/stories/index.tsx b/packages/js/product-editor/src/images/pants/stories/pants.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/images/pants/stories/index.tsx
rename to packages/js/product-editor/src/images/pants/stories/pants.story.tsx
diff --git a/packages/js/product-editor/src/images/shirt/stories/index.tsx b/packages/js/product-editor/src/images/shirt/stories/shirt.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/images/shirt/stories/index.tsx
rename to packages/js/product-editor/src/images/shirt/stories/shirt.story.tsx
diff --git a/packages/js/product-editor/src/images/shopping-bags/stories/index.tsx b/packages/js/product-editor/src/images/shopping-bags/stories/shopping-bags.story.tsx
similarity index 100%
rename from packages/js/product-editor/src/images/shopping-bags/stories/index.tsx
rename to packages/js/product-editor/src/images/shopping-bags/stories/shopping-bags.story.tsx
diff --git a/packages/js/product-editor/src/products.scss b/packages/js/product-editor/src/products.scss
index 33f49a1ae7b..463564ff88e 100644
--- a/packages/js/product-editor/src/products.scss
+++ b/packages/js/product-editor/src/products.scss
@@ -40,5 +40,7 @@ body.js.is-fullscreen-mode {
}
}
-@import "products-app/sidebar-dataviews/style.scss";
-@import "products-app/product-edit/style.scss";
+.woocommerce_page_woocommerce-products-dashboard {
+ @import "products-app/sidebar-dataviews/style.scss";
+ @import "products-app/product-edit/style.scss";
+}
diff --git a/packages/js/remote-logging/CHANGELOG.md b/packages/js/remote-logging/CHANGELOG.md
index f7aac6be3b3..31e41a6ad37 100644
--- a/packages/js/remote-logging/CHANGELOG.md
+++ b/packages/js/remote-logging/CHANGELOG.md
@@ -1,3 +1,18 @@
# Changelog
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [1.0.0](https://www.npmjs.com/package/@woocommerce/remote-logging/v/1.0.0) - 2024-09-09
+
+- Patch - Fix wc asset url check [#50701]
+- Minor - Add JS remote logging package [#49702]
+- Patch - Track frequency of unhandled JS errors with MC Stats [#50155]
+- Minor - Add query params sanitisation [#51046]
+- Patch - Add request_uri prop to remote logging data [#50671]
+- Patch - Comment: Fix some comment typos. [#50993]
+- Patch - Update README.md to document the filters specs & usage [#51010]
+- Patch - Update remote logger to check dev env and whether logging is enabled [#50134]
+- Patch - Fix pnpm version to 9.1.3 to avoid dependency installation issues. [#50828]
+- Patch - Tweak logic for adding remote logging tool in beta tester [#50425]
+
+[See legacy changelogs for previous versions](https://github.com/woocommerce/woocommerce/blob/68581955106947918d2b17607a01bdfdf22288a9/packages/js/remote-logging/CHANGELOG.md).
diff --git a/packages/js/remote-logging/changelog/49702-add-js-remote-error-logging b/packages/js/remote-logging/changelog/49702-add-js-remote-error-logging
deleted file mode 100644
index 9b540da3c02..00000000000
--- a/packages/js/remote-logging/changelog/49702-add-js-remote-error-logging
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Add JS remote logging package
\ No newline at end of file
diff --git a/packages/js/remote-logging/changelog/50828-dev-constrain-pnpm-version b/packages/js/remote-logging/changelog/50828-dev-constrain-pnpm-version
deleted file mode 100644
index fdead95ceb5..00000000000
--- a/packages/js/remote-logging/changelog/50828-dev-constrain-pnpm-version
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: dev
-
-Fix pnpm version to 9.1.3 to avoid dependency installation issues.
\ No newline at end of file
diff --git a/packages/js/remote-logging/changelog/50993-fix-some-comment-typos b/packages/js/remote-logging/changelog/50993-fix-some-comment-typos
deleted file mode 100644
index 3dce9f8d32b..00000000000
--- a/packages/js/remote-logging/changelog/50993-fix-some-comment-typos
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: update
-
-Comment: Fix some comment typos.
diff --git a/packages/js/remote-logging/changelog/add-bump-stats-error b/packages/js/remote-logging/changelog/add-bump-stats-error
deleted file mode 100644
index 2a41a632378..00000000000
--- a/packages/js/remote-logging/changelog/add-bump-stats-error
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: add
-
-Track frequency of unhandled JS errors with MC Stats
diff --git a/packages/js/remote-logging/changelog/add-remote-logging-beta-tester-tool b/packages/js/remote-logging/changelog/add-remote-logging-beta-tester-tool
deleted file mode 100644
index 1e7f8794894..00000000000
--- a/packages/js/remote-logging/changelog/add-remote-logging-beta-tester-tool
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: tweak
-
-Tweak logic for adding remote logging tool in beta tester
diff --git a/packages/js/remote-logging/changelog/add-wcadmin-remote-logging b/packages/js/remote-logging/changelog/add-wcadmin-remote-logging
deleted file mode 100644
index 230dd1e821f..00000000000
--- a/packages/js/remote-logging/changelog/add-wcadmin-remote-logging
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: update
-
-Update remote logger to check dev env and whether logging is enabled
diff --git a/packages/js/remote-logging/changelog/fix-remote-logging-asset-path b/packages/js/remote-logging/changelog/fix-remote-logging-asset-path
deleted file mode 100644
index fc166a1888b..00000000000
--- a/packages/js/remote-logging/changelog/fix-remote-logging-asset-path
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Fix wc asset url check
diff --git a/packages/js/remote-logging/changelog/update-remote-logging-data b/packages/js/remote-logging/changelog/update-remote-logging-data
deleted file mode 100644
index 69c8edf57c4..00000000000
--- a/packages/js/remote-logging/changelog/update-remote-logging-data
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: update
-
-Add request_uri prop to remote logging data
diff --git a/packages/js/remote-logging/changelog/update-remote-logging-readme b/packages/js/remote-logging/changelog/update-remote-logging-readme
deleted file mode 100644
index db2068ed42a..00000000000
--- a/packages/js/remote-logging/changelog/update-remote-logging-readme
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: update
-
-Update README.md to document the filters specs & usage
diff --git a/packages/js/remote-logging/package.json b/packages/js/remote-logging/package.json
index c96e6ca3f18..d56739c09a6 100644
--- a/packages/js/remote-logging/package.json
+++ b/packages/js/remote-logging/package.json
@@ -1,6 +1,6 @@
{
"name": "@woocommerce/remote-logging",
- "version": "0.0.1",
+ "version": "1.0.0",
"description": "WooCommerce remote logging for Automattic based projects",
"author": "Automattic",
"license": "GPL-2.0-or-later",
diff --git a/packages/php/remote-specs-validation/bundles/obw-free-extensions.json b/packages/php/remote-specs-validation/bundles/obw-free-extensions.json
index 4f6eab2bf3f..76da6d4426c 100644
--- a/packages/php/remote-specs-validation/bundles/obw-free-extensions.json
+++ b/packages/php/remote-specs-validation/bundles/obw-free-extensions.json
@@ -195,7 +195,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -217,7 +220,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
diff --git a/packages/php/remote-specs-validation/bundles/payment-gateway-suggestions.json b/packages/php/remote-specs-validation/bundles/payment-gateway-suggestions.json
index 78a72622f7b..37928228c99 100644
--- a/packages/php/remote-specs-validation/bundles/payment-gateway-suggestions.json
+++ b/packages/php/remote-specs-validation/bundles/payment-gateway-suggestions.json
@@ -179,7 +179,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -201,7 +204,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -864,7 +870,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -886,7 +895,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
diff --git a/packages/php/remote-specs-validation/bundles/remote-inbox-notification.json b/packages/php/remote-specs-validation/bundles/remote-inbox-notification.json
index c64ac57f605..f9b0de6f6b2 100644
--- a/packages/php/remote-specs-validation/bundles/remote-inbox-notification.json
+++ b/packages/php/remote-specs-validation/bundles/remote-inbox-notification.json
@@ -283,7 +283,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -305,7 +308,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
diff --git a/packages/php/remote-specs-validation/bundles/shipping-partner-suggestions.json b/packages/php/remote-specs-validation/bundles/shipping-partner-suggestions.json
index 0e886b8aca7..d86a98dd5df 100644
--- a/packages/php/remote-specs-validation/bundles/shipping-partner-suggestions.json
+++ b/packages/php/remote-specs-validation/bundles/shipping-partner-suggestions.json
@@ -173,7 +173,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -195,7 +198,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -847,7 +853,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -869,7 +878,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
diff --git a/packages/php/remote-specs-validation/bundles/wc-pay-promotions.json b/packages/php/remote-specs-validation/bundles/wc-pay-promotions.json
index 75f8d2fd7d1..c90eac95ab4 100644
--- a/packages/php/remote-specs-validation/bundles/wc-pay-promotions.json
+++ b/packages/php/remote-specs-validation/bundles/wc-pay-promotions.json
@@ -176,7 +176,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -198,7 +201,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -844,7 +850,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
@@ -866,7 +875,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
},
diff --git a/packages/php/remote-specs-validation/changelog.md b/packages/php/remote-specs-validation/changelog.md
index 3783eb0da3d..d645580a6a9 100644
--- a/packages/php/remote-specs-validation/changelog.md
+++ b/packages/php/remote-specs-validation/changelog.md
@@ -1,3 +1,26 @@
# Changelog
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [1.0.2](https://packagist.org/packages/woocommerce/remote-specs-validation#1.0.2) - 2024-04-12
+
+* Fix - Fix base_location_state and base_location_country value type [#51169]
+* Update - Bump all remote spec endpoints to version `2.0`. [#45298]
+* Update - Remove ToS acceptance where unnecessary [#46003]
+* Update - Update Woo.com references to WooCommerce.com. [#46259]
+* Dev - Fix whitespace in package.json [#44902]
+* Tweak - Fix typos. [#49207]
+* Tweak - Rename Google Listings and Ads with Google for WooCommerce #### Comment [#47614]
+* Tweak - Rename Google Listings and Ads with Google for WooCommerce [#47614]
+
+
+## [1.0.1](https://packagist.org/packages/woocommerce/remote-specs-validation#1.0.1) - 2024-02-28
+
+* Update - Accept JSON schema string as constructor argument instead of file path -- this is more fleixble. [#45151]
+
+## [1.0.0](https://packagist.org/packages/woocommerce/remote-specs-validation#1.0.0) - 2024-02-21
+
+* Add - Add JSON Schema files [#44484]
+* Add - Add project scaffolding [#44419]
+* Add - Support range operator in Remote Inbox Notification [#45201]
+* Add - Updated shipstation copy [#48549]
diff --git a/packages/php/remote-specs-validation/changelog/45201-add-44787-add-range-rule b/packages/php/remote-specs-validation/changelog/45201-add-44787-add-range-rule
deleted file mode 100644
index 332381bbbbe..00000000000
--- a/packages/php/remote-specs-validation/changelog/45201-add-44787-add-range-rule
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Support range operator in Remote Inbox Notification
\ No newline at end of file
diff --git a/packages/php/remote-specs-validation/changelog/45298-update-remote-endpoints-2.0 b/packages/php/remote-specs-validation/changelog/45298-update-remote-endpoints-2.0
deleted file mode 100644
index f1639f5b326..00000000000
--- a/packages/php/remote-specs-validation/changelog/45298-update-remote-endpoints-2.0
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: update
-
-Bump all remote spec endpoints to version `2.0`.
\ No newline at end of file
diff --git a/packages/php/remote-specs-validation/changelog/46003-update-remove-duplicated-tos-acceptance b/packages/php/remote-specs-validation/changelog/46003-update-remove-duplicated-tos-acceptance
deleted file mode 100644
index cbb0b4301b6..00000000000
--- a/packages/php/remote-specs-validation/changelog/46003-update-remove-duplicated-tos-acceptance
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: update
-
-Remove ToS acceptance where unnecessary
\ No newline at end of file
diff --git a/packages/php/remote-specs-validation/changelog/47614-tweak-google-extension-rename b/packages/php/remote-specs-validation/changelog/47614-tweak-google-extension-rename
deleted file mode 100644
index 4ac5ec3e8d9..00000000000
--- a/packages/php/remote-specs-validation/changelog/47614-tweak-google-extension-rename
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: tweak
-
-Rename Google Listings and Ads with Google for WooCommerce #### Comment
\ No newline at end of file
diff --git a/packages/php/remote-specs-validation/changelog/accept-json-schema-string b/packages/php/remote-specs-validation/changelog/accept-json-schema-string
deleted file mode 100644
index 1e1479613be..00000000000
--- a/packages/php/remote-specs-validation/changelog/accept-json-schema-string
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: major
-Type: update
-
-Accept JSON schema string as constructor argument instead of file path -- this is more fleixble.
diff --git a/packages/php/remote-specs-validation/changelog/add-json-schema-files b/packages/php/remote-specs-validation/changelog/add-json-schema-files
deleted file mode 100644
index e0dda27f72d..00000000000
--- a/packages/php/remote-specs-validation/changelog/add-json-schema-files
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Add JSON Schema files
\ No newline at end of file
diff --git a/packages/php/remote-specs-validation/changelog/add-php-package-RIN-testing b/packages/php/remote-specs-validation/changelog/add-php-package-RIN-testing
deleted file mode 100644
index ef5d8f75d92..00000000000
--- a/packages/php/remote-specs-validation/changelog/add-php-package-RIN-testing
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Add project scaffolding
diff --git a/packages/php/remote-specs-validation/changelog/add-update-shipping-specs-shipstation-copy b/packages/php/remote-specs-validation/changelog/add-update-shipping-specs-shipstation-copy
deleted file mode 100644
index 253ad9a432c..00000000000
--- a/packages/php/remote-specs-validation/changelog/add-update-shipping-specs-shipstation-copy
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: add
-
-Updated shipstation copy
diff --git a/packages/php/remote-specs-validation/changelog/fix-typo-in-remote-specs-validation-readme b/packages/php/remote-specs-validation/changelog/fix-typo-in-remote-specs-validation-readme
deleted file mode 100644
index a279c2fc260..00000000000
--- a/packages/php/remote-specs-validation/changelog/fix-typo-in-remote-specs-validation-readme
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: tweak
-
-Fix typos.
diff --git a/packages/php/remote-specs-validation/changelog/tweak-google-extension-rename b/packages/php/remote-specs-validation/changelog/tweak-google-extension-rename
deleted file mode 100644
index 8a85377cbb9..00000000000
--- a/packages/php/remote-specs-validation/changelog/tweak-google-extension-rename
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: tweak
-
-Rename Google Listings and Ads with Google for WooCommerce
diff --git a/packages/php/remote-specs-validation/changelog/update-woo-com-to-woocommerce-com b/packages/php/remote-specs-validation/changelog/update-woo-com-to-woocommerce-com
deleted file mode 100644
index 36ca65dd012..00000000000
--- a/packages/php/remote-specs-validation/changelog/update-woo-com-to-woocommerce-com
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: update
-
-Update Woo.com references to WooCommerce.com.
diff --git a/packages/php/remote-specs-validation/composer.json b/packages/php/remote-specs-validation/composer.json
index 95bca61eb23..6f828f244a6 100644
--- a/packages/php/remote-specs-validation/composer.json
+++ b/packages/php/remote-specs-validation/composer.json
@@ -1,6 +1,6 @@
{
"name": "woocommerce/remote-specs-validation",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "Remote specs testing suite",
"type": "library",
"license": "GPL-3.0-or-later",
@@ -9,9 +9,9 @@
"Automattic\\WooCommerce\\RemoteSpecsValidation\\": "src/"
}
},
- "autoload-dev": {
- "psr-4": {
- "Automattic\\WooCommerce\\RemoteSpecsValidation\\Tests\\": "tests/"
+ "autoload-dev": {
+ "psr-4": {
+ "Automattic\\WooCommerce\\RemoteSpecsValidation\\Tests\\": "tests/"
}
},
"require-dev": {
diff --git a/packages/php/remote-specs-validation/schemas/shared/rules/base_location_country.json b/packages/php/remote-specs-validation/schemas/shared/rules/base_location_country.json
index bcb565ef6b3..6d15e8f5ae2 100644
--- a/packages/php/remote-specs-validation/schemas/shared/rules/base_location_country.json
+++ b/packages/php/remote-specs-validation/schemas/shared/rules/base_location_country.json
@@ -10,7 +10,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
-}
\ No newline at end of file
+}
diff --git a/packages/php/remote-specs-validation/schemas/shared/rules/base_location_state.json b/packages/php/remote-specs-validation/schemas/shared/rules/base_location_state.json
index e2f1abb7fc9..b0f9266cbce 100644
--- a/packages/php/remote-specs-validation/schemas/shared/rules/base_location_state.json
+++ b/packages/php/remote-specs-validation/schemas/shared/rules/base_location_state.json
@@ -10,7 +10,10 @@
"$ref": "#/definitions/operations"
},
"value": {
- "type": "string"
+ "type": [
+ "string",
+ "array"
+ ]
}
}
-}
\ No newline at end of file
+}
diff --git a/plugins/woocommerce-admin/bin/hook-reference/data.json b/plugins/woocommerce-admin/bin/hook-reference/data.json
index 8693d4a18e4..67bdf3e86bd 100644
--- a/plugins/woocommerce-admin/bin/hook-reference/data.json
+++ b/plugins/woocommerce-admin/bin/hook-reference/data.json
@@ -810,19 +810,6 @@
}
]
},
- {
- "description": "Filter for Onboarding steps configuration.",
- "sourceFile": "https://github.com/woocommerce/woocommerce-admin/blob/46c8304c425749dfc715b38e59f56198b05e7b46/client/profile-wizard/index.js#L140-L145",
- "name": "woocommerce_admin_profile_wizard_steps",
- "type": "filter",
- "params": [
- {
- "name": "steps",
- "type": "Array.