* Add /merchant tests to the WPCOM suite
* Skip "can manually add a variation" on WPCOM
* Skip "Coupon management" - API returns 500 on delete
* Resolve `wp-block-woocommerce-checkout-order-summary-block` on the first element
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Initial implementation of the missing product state
- Changed `getProductCollectionUIStateInEditor` to a hook `useProductCollectionUIState`.
- As we added logic to check if selected product reference is deleted which require making an API call. Therefore, I decided to use a hook.
- While making an API call to check if product reference is deleted, I decided to show spinner in the block.
- Introduced new UI state `DELETED_PRODUCT_REFERENCE` to handle the missing product state.
- Updated existing `ProductPicker` component to handle the new UI state.
- It's better to use existing component for the missing product state, as it already has all the required UI.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Use getEntityRecord to check if product exists and other improvements
* Remove console log
* Add E2E tests for deleted product reference in Product Collection block
This commit introduces new E2E tests to verify the behavior of the Product
Collection block when dealing with deleted product references. The changes
include:
1. New test suite in register-product-collection-tester.block_theme.spec.ts
2. Modification to product-collection.page.ts to support custom product selection
3. Minor update to utils.tsx to handle trashed products
These tests ensure that the Product Collection block correctly handles
scenarios where referenced products are deleted, trashed, or restored,
improving the overall reliability of the feature.
* Simplify product creation in Product Collection block test
* Refactor E2E test for delete product reference picker
1. Removing the unnecessary `test.describe` block for "Deleted product reference"
2. Eliminating the `beforeEach` hook that was creating a test product
3. Integrating the test product creation directly into the main test
This change simplifies the test structure and improves readability while
maintaining the same test coverage for the Product Collection block's
behavior when dealing with deleted or unavailable products.
* Simplify logic for product collection UI state
This commit simplifies the handling of the `usesReference` prop in the
Product Collection block:
1. In `edit/index.tsx`, directly pass `usesReference` to
`useProductCollectionUIState` hook without conditional spreading.
2. In `utils.tsx`, update the type definition of `usesReference` in the
`useProductCollectionUIState` hook to explicitly include `undefined`.
* Refactor Product Collection block to improve prop passing
- Introduce ProductCollectionContentProps type for better prop management
- Refactor Edit component to use a renderComponent function
- Update component prop types to use more specific props
- Remove unnecessary props from ProductCollectionEditComponentProps
- Simplify component rendering logic in Edit component
- Adjust ProductPicker to receive only required props
- Update imports and prop types in various files to use new types
This refactoring improves code organization and reduces prop drilling by
only passing necessary props to each component. It enhances maintainability
and readability of the Product Collection block and related components.
* Refactor Product Collection block editor UI state handling
This commit simplifies the rendering logic in the Product Collection block's
Edit component. It removes a redundant case for the VALID state, as both
VALID and VALID_WITH_PREVIEW states now render the same ProductCollectionContent
component. This change improves code maintainability and reduces duplication.
* Fix: isDeletedProductReference is not set correctly
* Use "page.reload" instead of "admin.page.reload"
* Separate PRODUCT_REFERENCE_PICKER and DELETED_PRODUCT_REFERENCE cases
This improves readability and maintainability of the switch statement.
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add use-wp-horizon feature flag
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add error handling when the call to 'install-url' endpoint fails
* Changelog
* Ignore any explicitly
* Move the function below to address lint
* Change 'Try again' to a href, suggesting to download and install manually
* Lint
* reset styles for panel button
* reset styles for address card edit and address line 2
* Update shipping selector buttons
* fix line height
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* remove extra styles no longer needed
* update styles to balance chevron and change to span
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
* Expand WPCOM suite
* Skip core-profiler.spec.js on WPCOM - no "Coming soon"
* Skip `Analytics-related tests` on WPCOM - different sums
* Skip `Marketing Overview page have relevant content` - no content on WPCOM
* Payment setup task - make Save button more unique
* Include more tests in playwright.config.js
* Skip `Store owner can skip the core profiler`
* Add changefile(s) from automation for the following project(s): woocommerce
* Make "Get paid" more unique
---------
Co-authored-by: github-actions <github-actions@github.com>
* update Mongolia postcode to be 5 digits instead of 6
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* update validation package and expand mongolia checks
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* update lock
* fix lock again
---------
Co-authored-by: github-actions <github-actions@github.com>
* In-App: make in-app header sticky
z-index: 1 is required to make sure the header appears above product
cards.
Also had to remove a parent `overflow: hidden` property. Apparently,
it's there to remove a second scrollbar. Upon removal, I didn't see
any double scrollbars, although it can be platform differences. Will
check it out in the PR review.
* Add changefile(s) from automation for the following project(s): woocommerce
* Update Change Your Store width for Marketplace search listing
Setting it 450px hardcoded causes overflows and breaks the layout.
See:
https://github.com/woocommerce/woocommerce/pull/51187#issuecomment-2344003169
* Move CYS tweak to the component
It was placed in the marketplace SCSS code previously. GitHub:
https://github.com/woocommerce/woocommerce/pull/51187#discussion_r1758381473
* Remove marketplace-specific styles from customize store banner
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
* Add focus styles for select
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
- Add a new notice to the plugins list for products used without subscriptions reminding them to purchase.
- Remove notices for expired and expiring subscriptions from WooCommerce settings screens.
- Change link for subscribe and renew to add the product directly to cart.
---------
Co-authored-by: github-actions <github-actions@github.com>
* In-App Marketplace: Record the legacy Tracks event for Discover page
Fixes#21486
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Prevent search request in the Extensions > My Subscriptions page
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Track data for font and color pairings including 'Create your own' option in CYS
* Add changelog file
* Track data for logo flow
* Send the open param as part of the tracking event customize_your_store_assembler_hub_color_palette_create_toggle
* Pressable - run only /api-tests
* Skip on Pressable
* Fix lint errors
* WPCOM - run API only
* Revert "WPCOM - run API only"
This reverts commit 5e59be1663.
* WPCOM - run API only
* Update settings-crud.test.js so they are passing against Pressable
* Skip "can retrieve all tax settings"
* Skip "can view all system status items" on WPCOM
* Several skips in settings-crud.test.js
* Skip "Product review tests: CRUD" on WPCOM
* Skip "List all products > categories" on WPCOM
* Skip "can view all payment gateways" on WPCOM
* Skip "Orders API tests" on WPCOM
* Skip "Customers API tests: CRUD" on WPCOM
* Revert `playwright.config.js` files and include '**/api-tests/**/*.test.js',
* Add changefile(s) from automation for the following project(s): woocommerce
* Skip three more API tests for WPCOM
* Skip two coupons tests
* Update report name for Pressable and WPCOM to ``*-core-e2e-and-api`
---------
Co-authored-by: github-actions <github-actions@github.com>
* add max-width and border raidus to footer container
- to make it look similar to design your own theme box
* remove marketplace copy from footer
* add another tab to footer
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* add feedback on code
---------
Co-authored-by: github-actions <github-actions@github.com>
* Make padding consistent for all type of card contents as 24px
* Add changefile(s) from automation for the following project(s): woocommerce
* override margin bottom added by woo payments plugin for product cards
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add block to templates
* Register block type with php
* Create block type class
* Update webpack
* Move password strength meter component
* Add button styles when disabled
* Move password strength component
* Block WIP
* CSRF token handling
* Put new block behind feature flag
* Add experimental flag docs
* Update icon + description
* Changelog
* Lint errors
* Style controls
* Adjust icon markup
* subsctring match
* More specific import
* Fix test fail caused by layout shift
* Wording changes from Figma
* Check if logged in, not just if the current email is registered
* Use opacity for disabled button text
* Sync order data with customer after account creation
* Add id/fragment to form
* Remove overlay icon settings from parent block
* Change overlay block icon to generic button icon
* Add logic to remove overlay nav when overlay mode is set to never
* Add logic to add overlay nav when overlay mode is not never
* Add default attributes for overlay nav button
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Use unique icons for each overlay navigation close and open
* Add icon picker for open overlay navigation
* Add trigger type for overlay close navigation
* Add missing settings label
* Fix e2e tests
* Skip a test for overlay-navigation block
* Add e2e tests for overlay button behavior
* Fix linting error
* Skip overlay nav tests
* Fix icon size value not saving
* Revise logic to target explicitly the innerblock of product-filters
* Ensure overlay navigation is of type open-overlay
* Prevent possible race conditions
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add variation to Product Filters Overlay Navigation
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Move Product Filters Overlay Navigation to correct position
* Hide block when it is outside the Product Filters template part
* Display Navigation block in the frontend
* Show the Product Filters Overlay Navigation on the frontend
* Add logic to hide Product Filters Overlay Navigation block on the frontend
* Hide block on the Overlay template part
* Fix eslint errors
* Update the block variation title
* Remove the `isActive` property from the block variations
* Use Product Filters block context
* Replace enum with const
* Remove unnecessary `StyleAttributesUtils`
* Rename context key
* Move BlockOverlayAttribute to the constants.ts file
* fix BlockOverlayAttribute import
* Fix import error
* Improve code for the shouldHideBlock method
* Remove unnecessary attributes property
* Fix error in ProductFiltersOverlay block
* Add dialog to the Product Filters block
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix interactivity api error
* Prevent block from being hidden on Product Filters template part
* Fix inspector controls when block is hidden
* Add clickable action to the Product Filters Overlay Navigation block
* Fix interactivity directives that were not working for the Overlay
* Fix issue with dialog styles not being correctly applied
* Add the `closeDialog` functionality
* Parse and render blocks for the Product Filters overlay
* Fix padding
* Fix style for Product Filters Overlay navigation block
* Add e2e test
* Add e2e test to Product Filters Overlay template part
* Fix e2e test
* Fix issue causing the trigger button to show even though the overlay mode is set to 'Never"
* Fix issue causing close button to not be displayed in the dialog
* Add e2e tests
* Fix issue that was preventing users from scrolling down the dialog content
* Remove text duplication in e2e tests
* Remove unnecessary imports
* Fix php cs errors
* Fix php cs error
* Revert changes on Product Gallery modal styles
* Fix lint errors
* fix php cs lint errors
* fix php cs error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Revert "[React 18] Use `createRoot().render()` instead of `render()` (#48843)"
This reverts commit 752273e6ce.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* feat: Add memoization to EvaluateSuggestion class
This commit adds memoization to the `EvaluateSuggestion` class in order to improve performance by caching the results of the `evaluate_specs` method. The memoization is implemented using an associative array called `$memo`, which stores the results of previous evaluations based on the input specifications and logger arguments. The memoization logic checks if the results for a given set of specifications and logger arguments already exist in the `$memo` array, and if so, returns the cached results instead of re-evaluating the specs. This helps to avoid redundant computations and improves the overall efficiency of the `evaluate_specs` method.
* Add changelog
* Only use specs as key
* Move shipping test to correct folder
* Fix tests
* Fix tests
* Fix lint
* Address PR feedback
* Update order edit tests with shipping address tests
Update order edit tests with shipping address tests
* Add changelog
* Refactor new tests
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Update README.md
* Update 722.md
* Update 741.md
* Update docs-manifest.json
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
* Add classname to description section for business service card
* Decode HTML entities in product descriptions
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Raja sekar <raja.sekar.manimaran@automattic.com>
* Set product card price currency and suffix dynamically based on endpoint data
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove unnecessary comment
* Update types to match data received from WCCOM after further changes to the API
* Apply suggestions from code review
Allow for future currencies that might switch the symbol/value order
Co-authored-by: Dan Q <dan@danq.me>
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dan Q <dan@danq.me>
* Add product and group id properties to Tracks data for product card clicks
* Add changefile(s) from automation for the following project(s): woocommerce
* Update product tracksproperty to product_id
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
This PR adds the phone number to the FTS index on the order address table, and adds the migration routines so that we can recreate the index for shops that already have this enabled. Additionally, it also removes support for relevancy operators to make search performant.
Fixes#51213
* Blocks\Assets\Api: Do not attempt to update script_data transient with the same data
* Add changelog
* Update plugins/woocommerce/src/Blocks/Assets/Api.php
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
* Update plugins/woocommerce/changelog/50962-dont-update-transient-with-same-data
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
---------
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
* Updated storybook and renamed stories to use the *.story.js/tsx format
* Renamed stories within product editor and wc admin package
* Include *story files in product editor package
* Add storybook pages workflow
* Remove the 'on' param in storybook-pages
* Add changelogs
* Fix failing tests
* Add dirname for any other webpack configs that rely on the woocommerce-admin one
* Fix React 18 warnings
* Remove unneeded storybook packages from components package
* Remove storybook workflow, to be added as a follow up instead
* Revert @storybook/react back to fix unit tests
* Using new coupon_info metadata to determine the actual coupon id
Changes to make use of the new coupon_info meta data, if it exists, to determine the actually-used coupon.
If coupon_info meta data doesn't exist, I'm also adding an extra filter so, in case there are more than one active coupons with the same name, we filter out the ones that were created after the order.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
* Update isAddressComplete to allow only specific fields to be checked
* Update tests for isAddressComplete
* Update wording on "enter address" prompt in Cart sidebar
* Update Shipping to Delivery in cart & checkout shipping total
* Only check the city, state, country, & postcode fields in shipping calc
* Update wording in the "Ships to" section of cart/checkout sidebar
* Update shipping calculator button to say delivery
* Update tests to use new strings
* Remove test that was falsely passing anyway
This test checked for presence of a string that wasn't in the codebase. It also doesn't seem like a valid test. Why would we want to remove the button just because default rates are available?
* Add changelog
* Left align text in shipping calculator button
It floats weirdly in the middle with the new text changes
* Update text in tests
* Update wording in unit tests
* Update shipping calculator text in test
* Update shipping text in test
* Update use of shipping in tests
* Skip test with no translation available
* Lint fixes
---------
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Remove title for Extensions and Themes tabs
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dan Q <dan@danq.me>
* Update shopper tests and util to fix external env compatibility
* Update WPCOM config to include shopper tests and skip one from testing
* Update WPCOM config
* Update shopper shop title deletion test to avoid false positives
* Add search and click steps to afterEach
* Update selector in test to pass across all envs
* Update external PW configs for shopper tests
* Improve existing test to use WP API for setup
---------
Co-authored-by: Ivan Stojadinov <ivan.stojadinov@automattic.com>
* Fix no products component prematurely being rendered
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Use useMemo to memoirize component element on re-renders
---------
Co-authored-by: github-actions <github-actions@github.com>
* Skip `WooCommerce woo.com Settings`
* Make `Update` button more unique
* Run entire /merchant folder
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add a filter `woocommerce_report_categories_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_coupons_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_coupons_stats_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_customers_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_downloads_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_downloads_stats_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_orders_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_orders_stats_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_products_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_products_stats_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_revenue_stats_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_stock_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_taxes_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_taxes_stats_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_variations_orderby_params` for custom orderby query params
* Add a filter `woocommerce_report_variations_stats_orderby_params` for custom orderby query params
* Add changelog
* Add a method `apply_custom_orderby_filters()` in analytics GenericController
* Use the shared method to in analytics GenericController to apply custom
orderby enum
* Fix typo, add more comments in analytics custom orderby filter PHPDoc
---------
Co-authored-by: Tomek Wytrębowicz <tomalecpub@gmail.com>
* Define the event
* Add action sending an event in PC store
* Add directives and context to Product Template li element
* Use on--click directive in ProductImage
* Use on--click directive in Product Title
* Use on--click directive in Product Button
* Add changelog
* Add E2E tests
* Update docs
* Update blocks reference and docs manifest
* Update m,anifest
* Fix mistake in docs
* Regenerate docs manifest
* Fix lint
* Extractb new tests to a separate file
* Skip `Merchant can view a list of all customers, filter and download`
* Skip `can receive new order email`
* Expand Pressable run with new set of /merchant tests
* Move `should filter by All` into for loop with existing tests
* Wait between two actions with `networkidle`
* Skip two tests on Pressable
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove `networkidle` and use class `current` for the selected filter
* Fix ESLint error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Handle error for api.delete( coupons/<id> )
* Choose any product that contains "product" in its name
* Expand Pressable test suite
* Add changefile(s) from automation for the following project(s): woocommerce
* Add missing `throw` error
* Make product name more unique with `Date.now()`
---------
Co-authored-by: github-actions <github-actions@github.com>
* Move Pressable and WPCOM to release checks instead of daily checks
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Product filters ensure we can add multiple instances
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Add e2e tests to ensure multiple filters can be added
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update result-count template to display orderby message
* Update result count live region if products are sorted
* Bump result-count template version
* Remove additional full stop.
* Fix docblock spacings
* Remove jQuery code from sort by live region logic
* Validate filter result type
---------
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
* Skipping 11 tests for the Pressable website
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
* Add aria-label to checkout form landmark
* Remove aria-hidden from checkout form sub-titles
* Add aria-label to checkout form
* Add changelog file
* Remove aria-hidden from form-step snapshots
* Bump form-checkout template version
* Consolidate Store API and Core account creation handling
* Changelog
* Add hook doc
* Update tests to not use global settings
* Ignore lints for other hooks in file
* Wait for response across all requests, including on the checkout page
* Add changefile(s) from automation for the following project(s): woocommerce
* Update Docblock
---------
Co-authored-by: github-actions <github-actions@github.com>
* Make sure the WC Shipping slug is used for installation
* Make sure the check to show banner metabox work for HPOS as well
* Make ShippingLabelBannerDisplayRules::order_has_shippable_products work with HPOS as well
* Remove Jetpack plugin specific checks in ShippingLabelBannerDisplayRules
* Use correct variable names for dotcom connection
* Fix comments
* Remove depenency on WCS&T for showing WC Shipping promo banner
* Remove WC Tax and WC Shipping from incompatible plugins
* Vary action button label if WCS&T is already installed
* Inject config and render label purchase app after activation
* Open the purchase modal after adding it to DOM
* Render Shipment tracking metabox
* Use a different headline when WCS&T is already installed
* Fix UX when a none-compatible WCS&T is already active
* Fix CSS linting issues
* Fix Jslint issues
* Improve around usage of localized variables
* Fix and update JS tests
* Address phpcs issues
* Delete metaboxes of compatible WCS&T
* Remove redundant variable assignment
* Remove css and js of WCS&T if a compatible version is installed
* Fix failing legacy PHPUnit tests
* Only open the new label purchase modal if WCS&T is not active
* Remove redundant code around TOS acceptance for showing the banner
* Remove redundant test for Jetpack version checking
* Make sure target passed to MutationObserver.observe is available
* Add changelog file
* Add openWcsModal to component's prototype
* Add more js unit tests
* Address PHP notice
* Remove redundant variable assignments
* Rename wcsPluginSlug to more clear wcShippingPluginSlug
* Add a link to plugins page if incompatible WCS&T is already installed
* Remove unused function parameters
* Fix API resource path
* Handle a case where none compatible version of WCShipping is installed
* Show product picker control in the editor when a product context is required but not provided
Enhanced the Product Collection block by introducing the `selectedReference` attribute and implementing a product picker control. This control appears in the editor when a product context is required but not provided in the current template/page/post.
1. **block.json**: Added `selectedReference` attribute of type `object`.
2. **constants.ts**: Included `selectedReference` in the `queryContextIncludes` array.
3. **EditorProductPicker.tsx**: Created a new component for selecting products within the editor.
4. **editor.scss**: Added styles for the new Editor Product Picker component.
5. **index.tsx**: Updated logic to determine the component to render, incorporating the new Editor Product Picker.
6. **types.ts**: Defined types for `selectedReference` and updated `ProductCollectionAttributes` interface.
This enhancement allows merchants to manually select a product for collections that require a product context, ensuring the block displays correctly even when the product context is not available in the current template/page/post.
- **Product Picker Control**: Utilizes the existing `ProductControl` component for selecting products. This component is displayed in the editor when a collection requires a product context but it doesn't exist in the current template/page/post.
* Update label on ProductControl component
* Implement dynamic UI state management for product collection block
- Introduced `ProductCollectionUIStatesInEditor` enum to define various UI states for the product collection block.
- Added `getProductCollectionUIStateInEditor` utility function to determine the appropriate UI state based on context.
- Updated `Edit` component to use `getProductCollectionUIStateInEditor` for dynamic state management.
- Refactored `ProductCollectionContent` to utilize the new Editor UI state management.
* Fix: Product picker isn't showing
* Fix: Preview label state isn't showing
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Refactor WooCommerceBlockLocation type
- Introduced specific interfaces for WooCommerceBlockLocation, including ProductLocation, ArchiveLocation, CartLocation, OrderLocation, and SiteLocation, to improve type safety and code clarity.
- Updated createLocationObject function to return a BaseLocation type.
- Refactored useSetPreviewState hook in product-collection utils:
- Extracted termId from location.sourceData for cleaner and more readable code.
- Replaced direct access of location.sourceData?.termId with termId variable.
* Remove fallback to 0 in case there may be a product with id 0
* Use optional chaining to avoid undefined errors
* Rename to
* Change order of arguments in function
* Pass boolean prop instead of making further recognition of the UI state in ProductCollectionContent
* Destructure props in component
* Rename to
* Update names in enum
* Rename to and change the structure to single number.
* Rename location to
* Add a method to choose a product in the product picker in Editor
* Add E2E tests
* Fix failing e2e tests by changing location to productCollectionLocation
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Don't allow selecting product variations
* Minor code refactoring
* Fix: Product control isn't showing products
**Before**
```tsx
const getRenderItemFunc = () => {
if ( renderItem ) {
return renderItem;
} else if ( showVariations ) {
return renderItemWithVariations;
}
return () => null;
};
```
As you can see above, `return () => null;` is returning a function which is causing the issue. This will render nothing in the list. I changed this to `return undefined;`. This way, we will use default render item function.
* Translate text in ProductPicker component
* Improve E2E test
* Use createInterpolateElement to safely render strong HTML tag
* Fix E2E tests
* Fix E2E tests
* Product Collection: Inspector control to change selected product (#50590)
* Add Linked Product Control to Product Collection Block Inspector Controls
- Introduced a new `LinkedProductControl` component in the Product Collection block's Inspector Controls.
- This control allows users to link a specific product to the product collection via a dropdown with a search capability.
- Added corresponding styles to `editor.scss`.
- Integrated a `useGetProduct` hook in the `utils.tsx` to fetch and manage the state of the linked product data, including handling loading states and errors.
- Updated the Inspector Controls to include the new Linked Product Control component, enhancing the block's customization options for users.
* Add E2E tests
* Hide product picker when product context is available
* Improve logic to hide Linked Product Control
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Remove hasError state from useGetProduct hook
* Rename isShowLinkedProductControl to showLinkedProductControl
* Convert jsxProductButton to ProductButton component
* Refactor jsxPopoverContent to LinkedProductPopoverContent component
* Improve UI of Linked Product Control
* Address PR feedback
* Fix E2E tests
---------
Co-authored-by: github-actions <github-actions@github.com>
* Rename isUsesReferencePreviewMode to isUsingReferencePreviewMode
* Change order of conditions in getProductCollectionUIStateInEditor
---------
Co-authored-by: github-actions <github-actions@github.com>
* Revert "Store API: Do not resume orders with `pending` status (#50531)"
This reverts commit 3170acd1b0.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add products data views list
* Add navigation on the left
* Update edit site package
* Fix styling
* Add changelog
* Add wp/icons package to syncpack exception list
* Delete some unused stuff and address types
* Add changelog
* Remove un needed css
* Remove dependency on edit-site package
* Fix custom status filters
* Make sure page size works with view config
* Remove use of canvasMode and navigation context as it is not needed
* Remove wordpress/dom from syncpack
* Set the regular price when the `Change to:` price is left empty
* Avoid fatal error when price is empty
* Add changefile(s) from automation for the following project(s): woocommerce
* Avoid setting the price to 0 when there wasn't a previous sale
* Move the WC_Tests_Admin_Post_Types test to the appropiate folder so it's run
* Add e2e test
* Add e2e test
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint errors
* Fix lint errors
* Fix test
* Fix lint errors
* Revert mv
* Address increasing sale from 0
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add new prefix and suffix attributes
* Add editable prefix & suffix rich text fields
* Remove the uppercase style from prefix and suffix
* Render the prefix and suffix in the front end
* Fix lint errors
* Handle old sku block without prefix and suffix
* Improve the editor styles
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Use wp_kses_post to filter and format the suffix and perfix
* Address extra space when empty and better escaping
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add i18n_open_product_gallery prop to wc_single_product_params
* Trap focus inside the product gallery modal
* Ensure the product gallery controls are always visible
* Add changelog file
* Add space before parameter
* Early return if there is no elements enough to trap focus
* Revert changes on the gallery trigger link
* Remove unnecessary white sopace
* Fix trap focus when the arrow buttons are hidden
* Remove usage of the Photoswipe destroy event
* Disable PC render when content empty unless no results block is present
* Introduce empty PC classname
* Add E2E test
* Add changelog entry
* Ensure the render is preserved as expected
* Do not render empty div
* Update tests
* Try a different logic
* Add hint to the docblock
* Remove obsolete e2e test
* Update render handler name to acknowledge context
* Fix tests failing due to recent v3 update
* Restore block interactivity
---------
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Dismiss "Choose a pattern" if present
* Cover "New in store" for PRessable
* Handle error for `api.delete( coupons/<id> )`
* Check if `Select an option…` is available
* Expand Pressable suite
* Add changefile(s) from automation for the following project(s): woocommerce
* Missed one spec, adding it now
* Handle "Choose a pattern" popup
* Use `closeChoosePatternModal` instead
* Remove comments
* Add missing `throw` error
* Revert to check `Browse store` link, after updating template on Pressable
---------
Co-authored-by: github-actions <github-actions@github.com>
* Ensure stock change notifs only fire when necessary
In #49583 we changed when the actions that trigger stock change
notifications fire, to decouple them from order creation. However, it
turns out what during product creation, the stock quantity update
routines still run even when no stock is being set and even when the
"manage stock" setting is set to false. Rather than try to untangle the
web of why this happens (and potentially break other things in the
process), this simply adds a check for the "manage stock" setting prior
to firing the notif actions, and bail early if the product does not have
managed stock.
It also adds a unit test, which is really more of an integration test,
to ensure this behavior.
Fixes#50958
* Remove irrelevant doc block info
In #49583 we added a second parameter to the
`woocommerce_variation_set_stock` and `woocommerce_product_set_stock`
action hooks, but it was later removed. However, we didn't remove the
corresponding doc block info.
* Add changelog file
---------
Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
* Remove filter margins in the editor
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Remove small space after + sign
---------
Co-authored-by: github-actions <github-actions@github.com>
* Align Cart and My Account icons to the right in the Essential Header pattern
* Align navigation icon to the right in the Minimal Header pattern
* Add changelog file
* Don't initialize the block template compatibility classes in classic themes
* Conditionally initialize the block template compatibility classes when the template is being rendered
* Add changelog file
* Remove unnecessary blank line
* Conditionally initialize the block template compatibility classes when the template is being rendered (II)
* Change cursor style of preview button to default
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Hover and active state shouldn't change background color of the preview button.
* Remove use of wp-block-woocommerce-product-collection class
---------
Co-authored-by: github-actions <github-actions@github.com>
* fixes not allowed size parameter for any input types, which do not allow them
* add changelog
* Update plugins/woocommerce/templates/global/quantity-input.php
* Appease linter
---------
Co-authored-by: Lukas Kurzmann <lukas.kurzmann@sunlime.at>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
* Wait for cart response after applying coupons
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* trigger CI
* Delete plugins/woocommerce/changelog/50995-fix-flaky—cart—oupon-test-50928
---------
Co-authored-by: github-actions <github-actions@github.com>
* Skip - number of introductory patterns not same on Pressable
* Skip - "Want more patterns?" is always present, skipping for now
* Skip - it activates theme through CLI, don't work for Pressable
* Include /customize-store folder for Pressable execution
* Update month formatting
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
* Not show reviews in the frontend when they are disabled at store or product level
* Add tests for single product template
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix typo
---------
Co-authored-by: github-actions <github-actions@github.com>
* Restore changes from 48709
* Update the PluginUtil method and related unit test
* Update API endpoint, fix schemas
* Improve unit tests for API controllers
* Fake woopayments gateway is_account_partially_onboarded return false
* Refactor WooCommercePayments class to use get_woo_payments_gateway() function
* Add changefile(s) from automation for the following project(s): woocommerce-beta-tester, woocommerce
* Remove changelog
* Add unit tests
* Update changelog
---------
Co-authored-by: github-actions <github-actions@github.com>
* Skip `Introduction can be dismissed`
* This part is already covered in `Introduction can be dismissed`
* Skip Analytics-related tests since there are already some numbers on Pressable website
* Include admin related tests into default-pressable test suite
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
* Include add-variable-product/**/*.spec.js for Pressable env
* Use unique identifier for the Update button
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove @local tag
* Use getBy* instead of locator
* Use `locator( '#publishing-action' )`
* Fix lint issues
---------
Co-authored-by: github-actions <github-actions@github.com>
* Include products/block-editor into default-pressable set of tests
* Wait for `Block: Product attributes` before proceeding
* Add changefile(s) from automation for the following project(s): woocommerce
* Put comment on why to wait for the element
* Fix issue caught by Lint - @woocommerce/plugin-woocommerce
* Fix linting error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Move register product collection tester e2e tests from product collection file to its own file
* Add changelog file
* Remove the unstable allTextContents usage
* Remove page.waitForTimeout because it doesn't validate that the button is hidden after exactly 1 second
* Remove page.waitForTimeout from 'Should display properly in Product Catalog template' e2e test
* Let's use one parent describe per file for good practice
* Keeping the structure flat
* Disable woocommerce_calc_taxes before tests start
* TEMP: Comment on expect `#setting-error-settings_updated`
* Include activate-and-setup folder into test runs for external envs
* Update core-profiler.spec.js so it's passing on Pressable and WPCOM
* Check only active plugins
* "Total sales" is missing on one of the external sites. Trying without it.
* Remove comments
* Revert to use `#submit` locator
* Revert "#setting-error-settings_updated"
* Revert "I’m just starting my business" string - check `'` sign on CI
* Revert all strings that initially contained `'` sign
* Revert "Revert "#setting-error-settings_updated""
This reverts commit ae6b72b5c4.
* Revert "Revert "I’m just starting my business" string - check `'` sign on CI"
This reverts commit e852707e06.
* Revert "Revert all strings that initially contained `'` sign"
This reverts commit f978595303.
* Reload page and check settings state instead of verifying `#setting-error-settings_updated`
* Ensure the store is not in "Coming soon" mode before basic.spec.js
* Check if store is in "Comin soon" mode - `hasText` instead of `name`
* Remove `grepInvert: /@local/`
* WPCOM - run only `basic.spec.js`
* WPCOM - run only `basic.spec.js`
* Revert default-wpcpom/playwright.config.js
* Add changefile(s) from automation for the following project(s): woocommerce
* Introduce @skip-on-default-pressable and skip `Can connect to WooCommerce.com`
* Revert "Introduce @skip-on-default-pressable and skip `Can connect to WooCommerce.com`"
This reverts commit e38abebdd2.
* Re-enable "Go to WC Home and make sure the total sales is visible"
* Introduce @skip-on-default-pressable and skip `core-profiler.spec.js`
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix site visibility badge style
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update Block References doc
* Move the Block References to public Docs
* Change the place Block Reference is generated to
* Add changelog
* Update docs manifest file
* Update manifest
* Ensure WC's customer and cart props are initialized
If the customer or cart property of the main WooCommerce class is
accessed before the `woocommerce_init` action has fired, those
properties will be `null` instead of containing their respective
classes, which can cause a fatal error if you then try to access a
method on one of the classes. This makes sure the props will always
return a class.
Fixes#50245
* Revert "Ensure WC's customer and cart props are initialized"
This approach unexpectedly breaks a lot of things...
This reverts commit 310fd2c118.
* Alternate solution
The attempt to fix the problem wholistically ended up causing a lot of
things to break, so this is the band-aid approach instead.
* Add changelog file
* Remove unnecessary assignment to global POST var
This was polluting the results of the new test, causing it to fail.
* Remove usage of `prepare_item_for_response` function
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Detect Legacy Template block when it's inside a pattern
* Detect Single Product blocks when they are inside a pattern
* Typo
* Remove empty error messages
* Fix wrong variable passed to parse_blocks()
* Remove unnecessary parameters
* Add tests to check if the Single Product template contents are updated when the Legacy Template is in the content
* Add changelog file
* Linting
* Typo
* Make sure the correct template is used when deciding whether to disable the compatibility layer or not
* Simplify code
* Remove duplicate content in tests
* Simplify single product slug logic
* Add an extra test to make sure Single Product template logic doesn't leak into other templates
* Linting
---------
Co-authored-by: Sam Seay <samueljseay@gmail.com>
The support for such property was removed in woocommerce/woocommerce-admin#4858 ~4 years ago.
Co-authored-by: github-actions <github-actions@github.com>
* Remove title attribute from images in product gallery
* Remove wp-post-image class from image selector
* Scope the image locator to the link
* Add changelog file
* Move image params filter out of wp_get_attachment_image call
* Add docblock to the woocommerce_gallery_image_html_attachment_image_params filter
* Remove unnecessary empty space
* Set the regular price when the `Change to:` price is left empty
* Avoid fatal error when price is empty
* Add changefile(s) from automation for the following project(s): woocommerce
* Add e2e test
* Fix lint errors
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS - Move the ai/store-title endpoint to woocommerce admin api
* Add middleware and callback
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* CYS - Move the ai/business-description endpoint to woocommerce admin API
* CYS - Move the ai/store-info endpoint to woocommerce admin API
* Update endpoint
* CYS - Move the ai/images endpoint to woocommerce admin API
* CYS - Move the `ai/patterns` endpoint to woocommerce admin API
* CYS - Move the `ai/product` endpoint to woocommerce admin API
* CYS - Move the `ai/products` endpoint to woocommerce admin API
* CYS - Move the `private/patterns` endpoint to woocommerce admin API
* Remove unnecessary variable
* Replace endpoint
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint errors
* Fix some feedback
* Refactor route to return an error not an exception and add tests
* Fix lint errors
---------
Co-authored-by: github-actions <github-actions@github.com>
* Ensure translation is loaded for new shared file
* add other files
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Revert "PluginUtil: Add method to get active valid plugins (#48709)"
This reverts commit 4d68cd486e.
* Reintroduce get_all_active_valid_plugins public function after revert (#50885)
Retroduce get_all_active_valid_plugins public function after revert
---------
Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
* Add additional size units to product image element
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Store API: Add test coverage for Product Reviews endpoint
* Add changelog file
* Use assertSame() instead of assertEquals()
* Linting
* Fix category_id param test
* CYS - Move the ai/store-title endpoint to woocommerce admin api
* Add middleware and callback
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* CYS - Move the ai/business-description endpoint to woocommerce admin API
* CYS - Move the ai/store-info endpoint to woocommerce admin API
* Update endpoint
* CYS - Move the ai/images endpoint to woocommerce admin API
* CYS - Move the `ai/patterns` endpoint to woocommerce admin API
* CYS - Move the `ai/product` endpoint to woocommerce admin API
* CYS - Move the `ai/products` endpoint to woocommerce admin API
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce-beta-tester, woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix merge issues
* Add strict types
* Start extending from AIEndpoint
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update core profiler setup e2e to handle coming soon mode
This adds a new test to confirm that the store is in coming soon mode after completing the core profiler. Additionally, it adds a new test to confirm that the store is in coming soon mode after skipping the core profiler.
These changes are necessary to ensure that the core profiler setup works correctly when the store is in coming soon mode.
* Add changefile(s) from automation for the following project(s): woocommerce
* Include coming soon test case in core profiler steps
---------
Co-authored-by: github-actions <github-actions@github.com>
* Use stricter text selector
Removes text ambiguity to avoid errors like "Strict mode violation resolved to 2 elements". For instance, it might search for "Settings", and there might be a menu "Foo Settings" which would resolve to 2 elements. This changes the behavior to match the exact test, instead of a substring.
* Update page-loads.spec.js
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
This ensures the WC() session object is initialized before attempting to
get chosen shipping methods. If it's not initialized,
`wc_get_chosen_shipping_method_ids` will return an empty array.
Fixes#50283
- Add code docs to the Analytics classes and make get_order_statuses non-internal.
Document analytics classes and some methods. Add simple examples of how to use it. Give a brief "why?" and "when?" answers. Add links between related classes.
- Replace `Automattic\WooCommerce\Admin\API\Reports\*\Query` classes with a single `GenericQuery` class.
- Reduce the amount of duplicated code in Analytics `DataStore`s.
- Reduce duplicated code in Analytics controllers
- Add `FilteredGetDataTrait`, `OrderAwareControllerTrait`, and `StatsDataStoreTrait` for extension developers to reuse while creating custom Analytics
- Add a `GenericQuery` to reduce duplicated code in Query classes.
Also, to expose it to community extensions for reuse.
- Use `GenericQuery` instead of duplicated `Query` classes
- Move caching code to shared `DataStore::get_data`
- Move intervals specific `initialize_queries` to shared Trait
- Move intervals checking logic to shared `StatsDataStoreTrait`
- Reuse `GenericController::prepare_item_for_response` for `Reports\Controller` subclasses
- Reuse `GenericController::get_collection_params` for `Reports\Controller` subclasses.
- Move `get_items` code to shared `GenericStatsController`
- Move shared paginable controllers `get_items` code to the generic class
- Move fields param to `GenericStatsController`
- Separate `OrderAwareControllerTrait` from `ReportController`
to allow specific Analytics Controllers to extend the `Generic(Stats)Controller` directly, without extending the `ReportController`, which is used to list reports.
It's meant not to change any behavior. However, due to unification, it did tweak a few things mostly from the developer perspective:
- Previously, only some controllers threw an error from `get_items` when the data was missing; some did not. Now controllers the following Controllers changed behavior to also for such an error:
- Coupons
- Customers
- Downloads
- Orders
- Products
- Taxes
- the error has one error code from all controllers:`woocommerce_rest_reports_invalid_response` (previously there were report-specific)
- `woocommerce_rest_reports_categories_invalid_response` -> `woocommerce_rest_reports_invalid_response`
- In Orders Controller, the `$orders_data['order_number'], $orders_data['total_formatted']` are set in the `prepare_item_for_response` method, not in the `get_items`So `prepare_item_for_response` function is expected to be called with bare data from Query
- In Products Controller extended-info is now sanitized in the `prepare_item_for_response` method, not in the `get_items`
- ⚠️ (breaking) Previosly some Controlers' `prepare_item_for_response` function was getting and expecting first argument to be casted to `object`, while the rest of controllers used data as returned from the Store. This PR unifies this behavior for
- `Coupons\Stats\Controller`
- `Taxes\Controller`
- `Taxes\Stats\Controller`
So, if you extend those classes and override `prepare_item_for_response` in a way that expects `object`, you will get an error. (I have not found such cases in the `all-plugins` repo.)
All `woocommerce_rest_prepare_report_*` filters remain intact and inconsistent for backward compatibility.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mik <mikkamp@users.noreply.github.com>
* Fixed minor issues with recently added snippets docs
Fixed a few duplicate titles and encoding issues in the docs that were recently added via public resources.
* Create docs-check_payment_method_support
* update manifest
* fix linter errors
---------
Co-authored-by: Yaku <15178758+jacoswan@users.noreply.github.com>
* CYS - Move the ai/store-title endpoint to woocommerce admin api
* Add middleware and callback
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* CYS - Move the ai/business-description endpoint to woocommerce admin API
* CYS - Move the ai/store-info endpoint to woocommerce admin API
* Update endpoint
* CYS - Move the ai/images endpoint to woocommerce admin API
* CYS - Move the `ai/patterns` endpoint to woocommerce admin API
* CYS - Move the `ai/product` endpoint to woocommerce admin API
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove import
* Add changefile(s) from automation for the following project(s): woocommerce-beta-tester, woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Add strict types
* Extract AI_CONTENT_GENERATED constant
* Move instance creating to where it's used
* Add try/catch and fix the on Patterns
* Use the base AIEndpoint class
* Fix endpoint
* Update comment return type
* Fix comments
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add function to clear system status theme info cache to tool page
* Add clear cache tooltip to the template override section
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove extra td
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update makup of add to cart success message
* Update CSS to position the add to cart success message content
* Focus notice message after page loads
* Add changelog file
* Remove tabindex attribute from add-to-cart success message
* Update tests for the add-to-cart success message
* Remove white space on test
* Increase delay before focusing the error message
* Cobine delay with queue method
* Remove unnecessary woocommerce-notice-content class
* Swap view cart link order in notice
* Remove woocommerce-notice-content wrapper
* Refactor to vanilla JS code that focus on notice message
---------
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Match shop page when permalink structure is set to plain
* Revert uninteded change
* Match post types
* Check for param
* Add test for post_type check
* Fix tests
* Add changefile(s) from automation for the following project(s): woocommerce
* Use wp_parse_url
* Test returning false
* Lint fixes
---------
Co-authored-by: github-actions <github-actions@github.com>
* Methods for fetching and caching product feature restrictions.
* DTO for passing product feature rule set to the plugin.
* Main class for handling product feature restriction logic.
* Remove unconnected WCCOM site related restrictions.
* Start with minimalist rule
If `\WC_Product_Usage::get_rules_for_product( 27147 )` returns null it
means no rule set to apply for product with ID 27147. Otherwise, it
returns `\WC_Product_Usage_Rule_Set`.
* Remove unused constant
* Remove underscore prefix on the method name; it's discouraged by the linter
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Akeda Bagus <akeda.bagus@automattic.com>
* Add aria label to the Clear variation options link
* Make the matching variations alert a live region
* Bump add-to-cart variable template version
* Add changelog file
* Add docblock comment to woocommerce_reset_variations_link filter
* Revert changes for Clear variations button
* Make unavailable product combination message a live region
* Improve no matching variation message for screen readers
* Align variables declaration
* Bump template version
* Add role alert to the parent of the no matching message
* Add empty alt text for pesudo-element content
---------
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
* Update wc-template-functions.php
* Add changefile(s) from automation for the following project(s): woocommerce
* Update plugins/woocommerce/includes/wc-template-functions.php
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
* Add GTIN in structured data
* Changelog
* Add changefile(s) from automation for the following project(s): woocommerce
* Delete plugins/woocommerce/changelog/50087-tweak-add-gtin-ld-json
* Add changefile(s) from automation for the following project(s): woocommerce
* Lint
* Delete plugins/woocommerce/changelog/50087-tweak-add-gtin-ld-json
---------
Co-authored-by: github-actions <github-actions@github.com>
* Render total blocks before fields on checkout
* Reverse checkout total blocks position on desktop
* Add changelog file
* Add conditional styles to reverse checkout blocks order
---------
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* CYS - Move the ai/store-title endpoint to woocommerce admin api
* Add middleware and callback
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* CYS - Move the ai/business-description endpoint to woocommerce admin API
* CYS - Move the ai/store-info endpoint to woocommerce admin API
* Update endpoint
* CYS - Move the ai/images endpoint to woocommerce admin API
* CYS - Move the `ai/patterns` endpoint to woocommerce admin API
* Add changefile(s) from automation for the following project(s): woocommerce-beta-tester, woocommerce
* Fix duplicated entries
* Use AI endpoint base class
* Remove unnecessary change
* Add strict types
* Remove unnecessary return type
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update 1140.md
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Update 1140.md
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* CYS - Move the ai/store-title endpoint to woocommerce admin api
* Add middleware and callback
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* CYS - Move the ai/business-description endpoint to woocommerce admin API
* CYS - Move the ai/store-info endpoint to woocommerce admin API
* Update endpoint
* Add changefile(s) from automation for the following project(s): woocommerce
* CYS - Move the ai/images endpoint to woocommerce admin API
* Add changefile(s) from automation for the following project(s): woocommerce
* Use constant and normalize site title values
* Add base AI Endpoint class
* Fix lint error
* Use the endpoint base class
* Revert change
* Add changefile(s) from automation for the following project(s): woocommerce
* Use ai endpoint class
* Add strict types
* Fix lint error
* Add strict type
* Fix lint and use ai endpoint base
* Fix lint
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS - Move the ai/store-title endpoint to woocommerce admin api
* Add middleware and callback
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* CYS - Move the ai/business-description endpoint to woocommerce admin API
* CYS - Move the ai/store-info endpoint to woocommerce admin API
* Update endpoint
* Add changefile(s) from automation for the following project(s): woocommerce
* Use constant and normalize site title values
* Add base AI Endpoint class
* Fix lint error
* Use the endpoint base class
* Revert change
* Add changefile(s) from automation for the following project(s): woocommerce
* Use ai endpoint class
* Add strict types
* Fix lint error
* Add strict type
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS - Move the ai/store-title endpoint to woocommerce admin api
* Add middleware and callback
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* CYS - Move the ai/business-description endpoint to woocommerce admin API
* Use constant and normalize site title values
* Add base AI Endpoint class
* Fix lint error
* Use the endpoint base class
* Revert change
* Add changefile(s) from automation for the following project(s): woocommerce
* Add strict types
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add new default spec function
* Changelog
* Add a new method to get cached or default
* Add test
* Update comment
* Revert comment
* Update docblock
* Lint
* Typo
* Set specs to default when marketplace suggestion is disabled
* Update tests
* Track product and tax rates importer view triggered from WP importer screen
* Add changefile(s) from automation for the following project(s): woocommerce
* Use $this for the callback
* Make sure id exist
* Do not track if we are in a specific import screen
* Ignore phpcs warning -- we are not using the value
---------
Co-authored-by: github-actions <github-actions@github.com>
* feat: Update TaskLists.php to improve performance and fix bugs
The code changes in TaskLists.php optimize the performance by reducing unnecessary checks and improve the functionality by fixing bugs related to the "setup tasks remaining" feature.
* Update tests
* Add changelog
* Fix lint
* Update TaskLists.php to fix completed tasks array initialization
* Update Fiver Logo Maker LP link per request.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Rename woocommerce_is_store_page to woocommerce_is_extension_store_page
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Revert "Add new buttonAttributes API to style express checkout buttons coherently (#47899)"
This reverts commit 006fbc6714.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Update changelog
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* add email type to email field in Checkout block
* Add changefile(s) from automation for the following project(s): woocommerce
* fix changelog
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix inline documentation typos in woocommerce-blocks
* Add changelog file
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Remove original changelog
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Remove common query string variables which affect cart contents
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add busy state
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Missing global $wp
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove colon in product data meta box checkboxes
* Changelog
* Fix CSS for checkbox
* Update margin so the distance between checkbox and label is 8px, and distance between items are 32px
* Move checkbox to the left, added has-checkbox class, minor adjustments to margins
* Minor adjustment
* REST: Update product stock when removing line item from order
This ensures that the REST endpoint behaves the same as the UI when
updating an order to remove a line item.
Fixes#49651
* Add changefile(s) from automation for the following project(s): woocommerce
* phpcs cleanup
* Add unit tests
* phpcs cleanup
* Update plugins/woocommerce/changelog/50606-fix-49651-rest-remove-line-item-stock
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Add changefile(s) from automation for the following project(s): woocommerce
* Add void return type to new method
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Add variation to Product Filters Overlay Navigation
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Move Product Filters Overlay Navigation to correct position
* Hide block when it is outside the Product Filters template part
* Display Navigation block in the frontend
* Show the Product Filters Overlay Navigation on the frontend
* Add logic to hide Product Filters Overlay Navigation block on the frontend
* Hide block on the Overlay template part
* Fix eslint errors
* Update the block variation title
* Remove the `isActive` property from the block variations
* Use Product Filters block context
* Replace enum with const
* Remove unnecessary `StyleAttributesUtils`
* Rename context key
* Move BlockOverlayAttribute to the constants.ts file
* fix BlockOverlayAttribute import
* Fix import error
* Improve code for the shouldHideBlock method
* Remove unnecessary attributes property
* Fix error in ProductFiltersOverlay block
* Prevent block from being hidden on Product Filters template part
* Fix inspector controls when block is hidden
* Remove unnecessary import
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add aria-current to the current link in My Account side nav
* Update current page check for dashboard, orders, and payment methods
* Fix PHP linting errors
* Update function for getting current aria for account menu
* Bump template version
* Create a helper function to test current item in the account menu
* Fix liniting errors
---------
Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
* Update logic to allow new accounts to set their password
* Changelog
* phpcs ignores
* Doc block update
* Remove redirect if lost-password accessed by logged in user
* Remove restriction on lost password page
* Fix `Product meta` console error
* Add changefile(s) from automation for the following project(s): woocommerce
* Not use Atomic class
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS: avoid to enqueue jetpack scripts
* Add changefile(s) from automation for the following project(s): woocommerce
* remove not necessary import
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add context to type
* Clean up notifyerrors helpers
* Notify and clear top level cart errors
* changelog
* Make extensionCartUpdate surface the errors
* No automatic clearing of notice
* Handle generic errors only, add docs
* Rename param
* Fix linting in readme
* Update toc
* test coverage
* Unused import
* We're only dealing with arrays of errors so simplify logic
* Make hover status style like active
* Add changelog file
* Update changelog message
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
---------
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
* Make some methods agnostic of which fallback template is used
* Get rid of the template_is_eligible_for_fallback() util
* Get rid of the template_is_eligible_for_fallback() util (II)
* Add changelog
* Get rid of the template_is_eligible_for_fallback() util (III)
* Add back 'template_is_eligible_for_fallback' method
* Fix issue after rebase
* Remove some more instances of hard-coded templates from the template hierarchy code
* Update comments
* Remove unused template_is_eligible_for_fallback() function
* Add extra explanatory comment
* Pass default value to get_option
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Avoid registering block in the wrong context
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Fix Product meta translations
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* Remove AddToCartForm from the list of blocks to not register in posts
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Expose buttonAttributes to the express payment methods
* Add size and label attributes to the express checkout area
* Remove defaultHeight
* default button Label
* Remove the button label attribute
* Remove px from height
* Change large button height to 55px
* Load express checkout block with attributes
* Add toggle and borderRadius controls and remove getting border radius from the theme
* Remove extra border radius text
* Only pass buttonAttributes if toggled on
* Move express payment block attribute logic into a Provider
* Tidy up editor grid and parse attributes into context on frontend
* Add px to border-radius input
* Express payment methods not selectable
* Add a test
* lint fixes
* default button height is 48 not 4
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Update docs
* Add tests for express payment methods
* Center images within the express payment area in the editor
* Apply the buttonAttributes to the li container in the editor regardless of showButtonStyles
* Fix style issue
* fix linting
* fix lint again
* Update manifest
* Update docs manifest
* Resize images in editor
* lint fix
---------
Co-authored-by: github-actions <github-actions@github.com>
* Avoid registering block in the wrong context
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Fix Product meta translations
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Avoid registering block in the wrong context
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Format json
* Get title and description from the registered block
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Add empty array dep
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add lost password e2e tests
* Add changefile(s) from automation for the following project(s): woocommerce
* Update lost password e2e test
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add woocommerce_coming_soon option for all sites
* Set default option
* Add changelog
* Update `woocommerce_coming_soon` option to use `update_option` instead of `add_option`
* Cache order year_months in options for performance.
* Modify to prevent unnecessary option changed.
Add unit tests.
* Add the strict type directive.
* Use exact check to use more cache instances.
* Add clean state test.
* Add namespace.
* Namespace fixes.
* Add virtual product to fixtures
* Add test to check virtual products can be ordered
* Add test to check orders cannot be placed with invalid payment method
* Add test to ensure orders can't be placed with out of stock items
* Add test to ensure orders can't be placed with unowned coupons
* Add test to ensure orders can't be placed coupons exceeding usage limit
* Add test to ensure that orders can be placed with coupons.
* Add changelog
* Clean up coupon management
* use correct WC case
---------
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Dispatch JS event about PC being rendered
* Revert format changes
* Write the callback
* Add functions descriptions
* Add changelog
* Remove empty line
* Add tests
* Rename test cases
* Replace waiting for page load with more reliable expect.poll
* Remove leftover step
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
* Fix typo in function name
* Add collection name to default Product Collection block
* Expect collection name in the event
* Expose the collection name through IAPI context
* Send the collection name with the event
* Trigger event also on page change
* Remove unused CUSTOM collection type
* Provide documentation
* Update TOC
* Update tests that verify the event payload
* Improve E2E tests further
* Don't add a Product Catalog collection type to default collection
* Avoid repeating the same piece of code by extracting some function on tag processor
* Rename function to better depict its purpose
* Move the documentation to the right place
* Remove the unused variable
* Add example to dom-events doc
* Update documentation
* Update docs manifest
* Attach default collection name
* Add the default collection context in PHP so it covers all the cases
* Prevent exposing product catalog collection name in event
* Update docs
* Update test
---------
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
* Update core profiler continue button container
On desktop screens 900px and smaller, add a 140px tall container stuck to the bottom of the viewport
Add a transparent to solid white gradient to the container (top to bottom)
Vertically center align the continue button and dislaimer text inside the container
* Add docs
* Update style
* Exclude privacy page from the store pages -- it is a core page
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove privacy page deletion in unit test
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Add blueprint package
* Add blueprint to composer
* Register blueprint cli commands
* Add feature flag
* Add changefile(s) from automation for the following project(s): woocommerce
* Update packages/php/blueprint/src/Exporters/HasAlias.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Update packages/php/blueprint/src/Exporters/ExportInstallThemeSteps.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Update packages/php/blueprint/src/UseWPFunctions.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Set destination correctly
* Make sure the given path is within wp content dir
* Remove debug code
* Fix typo
* Fix typo
* Fix lint errors with README
* Move READMD.md from src to the root directory and add development.md
* Add run-unit-tests.sh
* Setup test env
* Create dirs recursively
* Remove debug code
* Update packages/php/blueprint/src/Util.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update packages/php/blueprint/src/ZipExportedSchema.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Check for steps key
* Use if statement
* Add hook comment for wooblueprint_exporters and wooblueprint_importers
* Fix plugin activation condition
* Check for download_link -- it can be empty
* Check to make sure a file was written
* Plugin must be deactivated before attemping to delete it
* Lint fixes
* Lint fixes
* blueprint - add rest api (#49765)
* Add blueprint rest api endpoint
* Rename process to import
* Add changefile(s) from automation for the following project(s): woocommerce
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Init.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Remove unavailable 2nd argument from get_param -- default values are already set from the rest api def.
* blueprint - add builder page (#49774)
* Add blueprint builder page
* Change to the correct endpoint
* Add changefile(s) from automation for the following project(s): woocommerce
* Note that the builder intro page is temporary
* Remove unused code
---------
Co-authored-by: github-actions <github-actions@github.com>
* blueprint - add blueprint settings page (#49775)
* Add blueprint settings page
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix broken test
* Lint fixes
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update unit test env
* Added composer scripts to setup and run tests
* Moved tests to Unit dir to make space for Integration tests later
* WIP Add tests
* Use full if statement
* Use the correct step names
* Use activate_plugin and wp_get_thmes from wp functions trait
* Skip inactive plugins
* Use plural for collections
* Add a comment for StepExporter
* Remove unused construct code
* Correct function return types
* Update packages/php/blueprint/src/Importers/ImportActivateTheme.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Use full if statement
* Make sure plugin is installed
* Use functions from trait
* Remove unused functions
* Pass $force_convert correctly
* Correctly assign $this->validator
* Fix lint issues
* Rename setOptions to setSiteOptions
* Do not use die() -- throw an exception instead
* Make sure slug is a valid WP plugin slug
* Remove hardcoded string with get_step_name()
* Fix lint issues
* Update json example files
* Removed woo-specific examples -- these should be placed in the core
* Updated the built-in steps to reflect the recent changes
* Update packages/php/blueprint/src/docs/json-examples/deletePlugin.json
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Rename to correct filename
* Set version number
* Use mime_content_type for checking mime type
* Catch all exceptions
* Only allow zip and json
* Remove unused function
* Remove unused functions
* Add PHPCS command and ruleset
* PHP lint fixes
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Init.php
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Add back removed functions
* blueprint - Add woo blueprint exporters and importers (#50057)
* Add woo blueprint exporters and importers
* Comment fix
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Add a test for ImportSetWCTaxRates
* Lint fixes
* Lint fixes
* Fix setWCShipping schema and data format
* Add woocommerce_default_country option
* Lint fixes
* Fix typo -- it should be decode, not encode
* Fix incorrect argument order
* Fix typo
* Export and import shipping method settings
* Lint fixes
* Lint fixes
* Type functions -- base PR has changed
---------
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Require admin for import and export
* Use mime type from $_FILES -- mime_content_type can return incorrect mime type depending on the system configuration
* Enable export button when backend errors out
* Enable export button when backend errors out
* Allow WooCommerce export
* Change copy text
* Remove redundant check
* Fix lint issues
* Fix lint issues
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* build project as well
* Add changefile(s) from automation for the following project(s): woocommerce-beta-tester
---------
Co-authored-by: github-actions <github-actions@github.com>
* wp-env: Update package dependency + add mysqlPort
Starting in v10.1.0, wp-env can take a `mysqlPort` property in both
`env.development` and `env.tests` objects, which allows you to specify
the database connection port. This port is otherwise randomly assigned
every time you start up the containers. This allows for having a more
consistent development environment.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai
* Further update to pnpm lock file
* Extract the checkbox list option logic into its own component
This allows to generate a dynamic id per option so it never repeats in the entire document.
* Add changelog file
* Move CheckboxListOptionControl to its own file
* Add value to the checkbox control to be aligned with the native input type=checkbox element. And also use it to get the correct checkbox by value in unit tests
* Because checkboxes not longer have fixed ids, now we use their value to lookup for them instead
* Updating snapshots since the checkboxes ids are now autogenerated
* Fixed the order of elements on the Order Confirmation screen
* Added changelog
* Linting.
* Add wrapper around account notices
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Add validation for global_unique_id in classic editor
* Fix an issue with validations in the text block
* Replace everything that is not number or hyphen in the product API
* Add pattern validation in the product and variation templates
* Add changelogs
* Increment regex to also accept empty string
* Fix e2e test
* Update update-stricter-global-unique-id
* Rest API product review the verified parameter is not working
* added changelog
---------
Co-authored-by: 79mplus Admin <36501099+79mplus-admin@users.noreply.github.com>
* Update Jetpack logic
* Removed use of jetpack-boost -- we no longer run the experiment
* Jetpack should be considered as selected if it is already installed
* Add changefile(s) from automation for the following project(s): woocommerce
* removed jetpack check because it's already checked prior
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: rjchow <me@rjchow.com>
* Product Gallery: add defensive check
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS: Improve opt in flow
* Add changefile(s) from automation for the following project(s): woocommerce
* fix import
* fix imports and remove not used functions
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update "Learn More" docs link for incompatible extensions
* Update links to blocks documentation
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Remove Unnecessary changelog message
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Delete unneeded changelog file
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Improve getting the active plugins slugs with multisite aware logic
* Use better WP function to test for active plugin
* Minor docs fixes
* test: Add a multisite test
* Add changelog
* test: Fix unit tests relying on active plugins
* test: Cleanup
* test: Add unit test for WCPay DefaultPromotions
* Lint fixes
* Manually init template registry and cotnroller when get_query_template returns nothing
* Add changefile(s) from automation for the following project(s): woocommerce
* Validate template before including it
* Move class registration to init method
* Remove container registration from coming soon handler
* Lint
* Moved registration to register_dependencies
* Change blocks init condition to only when it's not initialized
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* update: new simplified markup and style
* add: editor preview
* add: show 15 items initially
* fix: render li class for checked items
* chore: naming
* chore: changelog
* update: set some preview items checked for styling purpose
* fix: only show show more button when the list is long
* chore: lint
* fix: e2e tests
* CYS: disable zoom out on fonts iframe
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Reschedule jobs blocked by other delayed jobs
* Add changelog entry
* Comment next action time fallback
* Allow actions to be scheduled in the past
---------
Co-authored-by: Eason <eason.su.tw@gmail.com>
Create a new filter wc_lock_sku_query to allow third party to filter the SKU lock query.
Fixes#49660
* Create new filter wc_lock_sku_query.
* Bail early with filter prop @coreymckrill
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Moves the check for low/no stock to the point when a product's stock quantity is updated. This decouples the check from orders, since stock can also change in other contexts (such as updates via REST API).
Fixes#31664
* CYS: Fix autoscroll when a new block is added
* add E2E test
* Add changefile(s) from automation for the following project(s): woocommerce
* remove not necessary changes
* rename blockToScroll to insertedPattern
* add smooth scroll
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS: fix survey tracking
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Customer Account - Maintain the size of the icon in smaller screens
* Hide overflow text
* Update logo and buttons color
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
---------
Co-authored-by: github-actions <github-actions@github.com>
* fix: always return an object
* tweak: fallback to the default product attribute
* add: default product attribute pattern
* update: use default product attribute pattern in the template part
* chore: changelog
* tweak: escaping
* performance: add in memory cache
* chore: lint and use strtr for readability
* CYS - Move the ai/store-title endpoint to woocommerce admin api
* Add middleware and callback
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint error
* Use constant and normalize site title values
* Add base AI Endpoint class
* Fix lint error
* Extract the ai title option name
---------
Co-authored-by: github-actions <github-actions@github.com>
* Register remote log handler in WooCommerce class
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint
---------
Co-authored-by: github-actions <github-actions@github.com>
* Customer Account - Maintain the size of the icon in smaller screens
* Hide overflow text
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Add ability for a screen reader to announce the current tab on a single product page.
Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
* Remove manual include PHP file since we have autoloading
* Delete transient on store country change
* Attach store country to data sources URLs
* Add WCPay default promotions
* Fallback to WCPay default promotions when marketplace suggestions are off
* Remove unused constant
* Replace deprecated uses
* Fix typos and off-brand docs
* Add changelog
* Lint fixes
* test: Update unit tests
* Cleanup
* Declare strict types
* Lint fixes
* Use default specs when remote ones are empty
* test: Update unit tests
* Lint fixes
* Lint fixes
* Remove needless condition
* Compatibility Layer: fix 'woocommerce_before_single_product_summary' hook position
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add tests for geolocation_ajax_get_location_hash
* Make geolocation_ajax_get_location_hash case-insensitive
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix changelog.
* Docblock.
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix changelog.
* Strict types is required.
* Set state before assertion
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Refactor to add steps in 'can create a simple product' test
* Remove unnecessary await
* Fill in shipping dimensions
* Add frontend verification step
* Get permalink from editor page
* Verify shipping dimensions
* Verify sku and gtin
* Fix label association for sku field
* Fill in shipping class
* Fill custom field
* Handle SKU auto-update before filling in SKU
* Changelog
* Changelog
* Add more specific locator for attributes "Add new" button
* Update comment for why click() is used instead of check() for toggle
* Fix incorrect selector for attributes "Add new" button
* Remove check for toggle being checked, as it is flaky
* Await isChecked()
* Scroll custom fields toggle into view if needed
* Make custom field toggling more reliable
* Break filling into a separate step
* Break filling and verifying of full description into separate steps
* Verify the description and fix verifying shipping details
* Make showing of description toolbar more reliable
* Suppress errant warning
* Suppress warning for conditional and add comment about why it is okay
* Remove unused const
* Use Playwright's last info run
* Add changelog
* Fix workflow syntax
* Fix workflow syntax
* Try with continue-on-error
* Try with merge-multiple
* Try with pattern instead of name
* Print the run command
* Print the run command
* Use LAST_RUN_FLAG
* Update outputDir
* Update upload paths and parse the file content
* Don't try to download lat run info if the test type is not e2e
* Rename the downloaded file
* Rename the downloaded file
* Rename the downloaded file
* Full path to the downloaded file
* Check download path content
* Check download path content
* Check the last-run file in the right path
* Fail different tests on different run attempts
* Fix artifact name
* Force test failures
* Cleanup console logs
* Cleanup console logs
* Cleanup console logs
* Log if last run info exists but no tests are found
* Revert test changes
* useZoomOut hook
* Update iframe with logic with zoomed out feature
* Add back in styling code for margins
* Spaces to tabs
* Device size toolbar
* Move zoom out state to context
* Rename variable
* Fork iframe component from Gutenberg
* Add getCompatibilityStyles needed for forked iframe
* Update usePopoverHandler iframe selector
* Remove zoom out context as its not needed
* Revert "Remove zoom out context as its not needed"
This reverts commit b29780d805.
* Add Zoom Out toggle to icons WIP
* Fix icon fill
* Update selectors to fix toolbar and sidebar pattern bugs
* Add comment to get getCompatibilityStyles file
* Update iframe comment
* Move device toolbar into its own component
* Resize and device changes
* Add prop to disable the resize handler
* Update toolbar to work with Zoom Out
* Hide changes behind feature gate so they dont impact design with AI flow
* Toolbar account for top device bar
* Add body class for with/without AI flow
* Adds changelog
* Fix typo
* Change TS comment to expect error
* Cleanup iframe with unneeded code
* Remove getcompatibilitystyles
* Remove device code from resizable frame
* Add ? operator
* Remove keydown code from iframe
* Fix toolbar scroll
* Pass deviceType as a prop to resizable frame
* Disable devicetoolbar whilst editor is loading
* Disable focus state
* Remove comment
* not disabled selector for button hover states
* Fix linting
* Remove unused fn
* Focus specific styles
* Remove active shipping zones check for displaying shipping calculator
- Remove active shipping zones check for displaying shipping calculator on Cart Page
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Use admin password reset link on admin login screen
* Add changelog
* Take a different approach that’s compatible with JN
* Update code comment
* use existing variable
* Update tests
* Lintfix
* Change to alternative aproach for detecting admin login form
* Whitespace
* Update test
* Lint fix
* Update sidebar-navigation-screen-typography.tsx
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS: improve CTA
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Correctly cast the account creation nag option
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update 920.md
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Change address title from h3 to h2 on my account
* Bump up my-address template version
* Add changelog file
* Change address title from h3 to h2 on edit address page
* Bump up form-edit-address template version
* Update form-edit-address.php
* Update my-address.php
---------
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
* Update config.js
* Update data.json
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Create a new filter woocommerce_is_store_page for filtering if the URL is a store page.
Fixes#50173
* Create new filter for filtering if the URL is a store page
* Fix brace
* Update plugins/woocommerce/src/Admin/WCAdminHelper.php
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove extra whitespace
---------
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
* move checkout docs with front matter to main folder (#49186)
* move checkout docs with front matter to main folder
---------
Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
* initial commit to reapply changes from PR #49186
* update html tags to unicode and clean up hashlinks
* revert unicode
* remove emoji
* update manifest
* test readme page
* remove avail-filters since it is now redundant with the readme
* update links
* test htmlentity
* pdate links
* typo fix
* update readme with actual doc
* fix links
---------
Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
* Improve the error when a request fails due to permissions
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix regression and copy
* Fix feedback: improve types
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS: Improve tracking survey
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update filter-setter.php
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>