* Simplify add template title and description
* Add template title and description on 'get_block_template' hook. Fixes#42221
* Add tests
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix test in template parts
* Use BlockTemplateUtils::template_has_title when possible
* Add test also when saving the default WooCommerce template
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add ability to select thumbnails using keyboard
* Add ability to open the Product Gallery pop up using the keyboard
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix outline border not showing on Thumbnails on some browsers
* Prevent firefox browser from focusing on UL tag of the Large Image block
* Enable usage of 'Space' and 'NumpadEnter' keys to navigate between the thumbnails
---------
Co-authored-by: github-actions <github-actions@github.com>
* fix error on decimal input for the Number of Thumbnails setting
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add e2e tests for password-protected Single Product block template
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Fix tests
---------
Co-authored-by: github-actions <github-actions@github.com>
* Initial working version
* Update scrolling behavior in product collection block frontend
This commit updates the scrolling behavior in the product collection block's frontend script.
Previously, the code focused on the first anchor or button within a product collection block. This approach was taken to maintain accessibility and ensure that the focused element was scrolled into view. However, this behavior has been changed to improve the user experience.
The updated code now directly scrolls to the first product in the collection. This is achieved by selecting the product using a new selector that targets the `.wc-block-product` class within the `.wc-block-product-template` of the specified `data-wc-navigation-id`. Once the product is selected, the `scrollIntoView` method is used with smooth behavior and start block alignment, offering a more visually appealing scroll effect.
This change enhances the user experience by smoothly directing attention to the beginning of the product collection, making it easier for users to browse products.
* Remove code related to animation
* Fix the issue related to pagination block rendering
- I have improved the code by breaking it into smaller functions
- Added unique `data-wc-key` to each anchor tag
* Enhance Product Collection Block with Interactive Prefetching
* Refine Prefetch Logic & other improvements
This commit further refines the prefetch logic and interactivity in the Product Collection block. It focuses on enhancing code clarity and improving the prefetch behavior based on user interactions.
Key changes include:
1. Renamed 'isPrefetchNextAndPreviousLink' to 'isPrefetchNextOrPreviousLink' in ProductCollectionStoreContext for better readability and accuracy.
2. Modified the scrollToFirstProductIfNotVisible function to accept a wcNavigationId as a parameter instead of a reference
3. Introduced checks for the existence of wcNavigationId in scrollToFirstProductIfNotVisible to prevent unnecessary executions.
4. Updated comments throughout frontend.tsx for enhanced clarity, explaining the prefetch logic and its triggers in detail.
5. Adjusted the logic in the navigate and prefetch functions to align with the new context structure and prefetch strategy.
6. In ProductCollection.php, updated data attributes to align with the revised prefetch strategy.
7. Refined the attribute setting in process_pagination_links function to correctly implement the updated interactivity and prefetch logic.
These changes aim to optimize the prefetch functionality, reduce unnecessary prefetching on initial page load, and ensure a smoother and more efficient navigation experience within the Product Collection block.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Improve comments
* Use wp_json_encode for data-wc-interactive attribute
This commit updates the `ProductCollection` class to use `wp_json_encode` for setting the `data-wc-interactive` attribute value. Previously, the attribute value was hardcoded as a JSON string. Now, by utilizing `wp_json_encode`, we ensure the JSON encoding is handled correctly by WordPress standards, enhancing readability and maintainability of the code.
---------
Co-authored-by: github-actions <github-actions@github.com>
* Initial approach to fix incorrect product data displayed in Product Collection in context of Single Product block
* Remove the BlockCOntextProvider
* Add Block context for title and summary
* Add changelog
* Improve typing
* Add E2E test with Product Collection inside Single Product block
* Improve insertBLock function description
* Make productPrices selector in Product Collectionmore specific
* Extract components props into a types
* Rename block template customization test files
* Move Checkout Header template part tests to parameterized tests
* Make it so 'userText' in tests is different in each template, so prevent false positives
* Move Mini-Cart template part tests to parameterized tests
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Make sure there are products in cart before going to the Checkout template
---------
Co-authored-by: github-actions <github-actions@github.com>
* Migrate coupon- and shipping-related tests
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Fix prettier issue
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add theme-customization e2e tests to Cart and Checkout templates
* Add theme-customization e2e tests to Order Confirmation template
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Update after rebase
* Make it so Order Confirmation template tests are also part of the parameterized tests
* Use CUSTOMIZABLE_WC_TEMPLATES constant instead of defining the templates again
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Fix wrong template slug
* Rename 'default' to 'fallback' template
---------
Co-authored-by: github-actions <github-actions@github.com>
* Avoid duplicate templates appearing on the Site Editor when the WooCommerce template and the theme template have been customized by the user
* Add tests
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Clean up templates after running all tests to increase speed
* Fix comment linting
* Fix addToCart() util with the classic template
* Remove unnecessary condition
---------
Co-authored-by: github-actions <github-actions@github.com>
* Hide the shipping rates in editor to match front-end
- If there are no shipping rates, hide the shipping rates in editor to match front-end.
* Add get_shipping_zones method to CartCheckoutUtils
* Display change address like for fallback shipping zone
- If cart has multiple and default shipping zones without shopper address, display the change address link
* Update shipping address label
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix linting errors
* Update plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/shipping/shipping-address.tsx
Co-authored-by: Niels Lange <info@nielslange.de>
* Display shipping calculator for locations outside all other zones
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Update typescript for activeShippingZones
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Move Cart, Checkout and Order Confirmation template customization tests to the parameterized tests file
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Clean up order-confirmation.block_theme.spec.ts file
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove docs plugin from monorepo
* Add language to md-docs readme
* Fix lint error in blocks
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix session notices in Cart and Checkout block pages
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Update plugins/woocommerce-blocks/assets/js/base/components/notice-banner/style.scss
Co-authored-by: Niels Lange <info@nielslange.de>
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Add e2e tests to verify specific theme templates have priority over user-modified Product Catalog template
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Add e2e test to hover Mini Cart totals
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Optimise hover test
---------
Co-authored-by: github-actions <github-actions@github.com>
* Convert block templates tests to parametized tests
* Use frontendUtils.addToCart() when possible
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update commands to run e2e tests
* Capitalize Product Catalog template name
* Create tests with block theme with templates
* Create Block Theme with Templates test environment
* Update classic theme commands
* Code cleanup
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Code cleanup (II)
* Add config to blocks-playwright.yml and remove unnecesssary .github/workflows/playwright.yml file
* Remove unnecessary imports from product-catalog-template.block_theme_with_templates.spec.ts
* Update blocks e2e commands to pnpm
* Replace hardcoded strings with a variable
* Unify all 'block theme with templates' tests in a parameterized test
* Create a testData object for the Mini-Cart template part test
* Fix some code styling issues
* Create a testData object for the Mini-Cart template part test (II)
* Remove duplicate userText variable
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add unique ID attribute to Product Collection block
In this update, we introduced a unique identifier for each instance of the Product Collection block. This change involves several key modifications:
1. **Block JSON Update**: Added a new `id` attribute in `block.json` to store the unique identifier for each block instance.
2. **Product Collection Content Update**: In `product-collection-content.tsx`, we utilized the `uuid` library to generate a unique ID. This is done in a `useEffect` hook, ensuring that each block instance receives a distinct ID upon initialization.
3. **Type Definitions**: The `ProductCollectionAttributes` interface in `types.ts` was updated to include the new `id` attribute, aligning with our enhanced data structure.
4. **Package Dependencies**: To support this feature, `@types/uuid` and `uuid` were added to `package.json`, ensuring we have the necessary tools for ID generation.
This enhancement is pivotal for uniquely identifying each Product Collection block, paving the way for more robust and individualized block handling in the future.
* Rename uniqueId to id
* Add lock file
* Add 'id' context to product collection and template
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Merge trunk with 42861-introduce-a-unique-identifier-for-each-product-collection-block
* Regenerate the lockfile
* Remove autogenerated change in plugins/woocommerce/package.json
* Regenerate lock file
* Rerun CI actions
* Delete pnpm-lock.yaml file & regenerate it using pnpm install command
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove the experimental flag from the Product Gallery block
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add test to Product Collection - featured products filters
* Open Featured option before trying to set it up
* Add test for Created filter
* Add missing awaits
* Add tests for a price range filter
* Add explanation to test step
* Update the conditions for created filter
* Add changelog
* Change leftover values
* Empty commit - trigger CI
* Get default attributes on front end
* Remove console log
* Show notice about 0 registered fields in editor
* Do not show block in editor if no fields are registered
* Wrapper block
* Styling/spacing
* Update webpack config
* Register heading pattern
* Wrapper block type definition
* get_fields_for_location return fields in array format
* Use wrapper in default content
* Separate fields from the hook block
* Hide when no custom fields exist
* Address and contact fields
* Shared form fields in settings
* remove info block from wrapper
* Revert render_content to original
* rename block
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Update styling
* Create shared get_order_additional_fields_with_values to format values
* Update block names and descriptions
* Show address placeholders
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Unused import
---------
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
* Migrate mini cart tests
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Adjust broken e2e test
---------
Co-authored-by: github-actions <github-actions@github.com>
This bumps the version to 0.14.3 so that we can take advantage of some
upstream improvements. It also makes some changes to the way our
builds and watches work to minimize the number of unnecessary
Node processes involved in the execution.
* Product Gallery: Update div elements to ul and li for better accessibility
* Product Gallery: Add changelog files
---------
Co-authored-by: roykho <roykho77@gmail.com>
Unfortunately, it looks like we need to build in order
to be able to lint. This makes sense since some
projects will lint imports from others that haven't
been built yet.
* Add test to check Product Collection filtering by tags
* Set single product out of stock and unskip the test for stock status
* Add changelog
* Use more specific selector
* Update variables holding products in products.sh to keep the same convention
This adds support for using the `pnpm utils ci-jobs` command in our `ci.yml` file. One of the bigger benefits to this change too is that we're now distributing a bundled version of the utils tool. This lets us run it without actually having to install the repo and will let us speed up any workflows that currently do.
* Prevent body from scrolling when pop-up is open
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Add namespace to the modal-open css class
* Fix class name for the Product Gallery block
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix Mini-Cart price disappearing on hover
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Playwright migrated test file bootstrap and first test for local pickup
* Added page reload to force a new render
* Updated test description
* WIP: figuring out the fake input checkbox
* WIP: figuring out flaky state of local pickup enabled
* Fix flakey enable/disable local pickup
* Migrated remaining local pickup tests to Playwright
* Removed deprecated E2E
* Added changelog
* Corrected linting errors
* Fixed playwright/no-element-handle lint error
* Replace CSS IDs and classes with recommended built in locators
* Remove obsolete function calls
---------
Co-authored-by: Niels Lange <info@nielslange.de>
* Add e2e tests to verify Products by Category/Tag/Attribute templates default to Product Catalog template
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add e2e tests for user customization of block templates
* Update instructions to run Playwright e2e tests
* Code cleanup
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Create revertTemplateCustomizations util
---------
Co-authored-by: github-actions <github-actions@github.com>
* Introduce the minimal block style for productDetails block
* Change the default style in the template
* Change the default template when using the transform-to-blocks button
* Cleanup
* Organize CSS selectors
* Add opacity on hover
* Fix specificity and add explanation
* Cleanup
* Changelog
* Rename media setting to "Open pop-up when clicked"
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* fix - Product Button: don't trigger old add to cart function when the button is clicked on classic themes
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* improve E2E tests
* update changelog
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* update changelog
* use beforeEach
---------
Co-authored-by: github-actions <github-actions@github.com>
* Product Gallery: Use @container rule to adjust overlay link count font size
* Add changelogs
* Remove em from line height
* Make view all link smaller
* Delete woocommerce-gutenberg-products-block.php file
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Move the switch to classic shortcode block button to separate component
- Move modal component file from incompatible-extension-notice component folder to switch-to-classic-shortcode-button folder.
- Rename modal component file to model-content component file.
- Move the switch to classic shortcode block button to separate component folder
* Update generic incompatibility notice
- Update the notice description.
- Add switch to classic shortcode block button to the notice.
* Fix margin in editor.scss
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Update class names in switch-to-classic-shortcode-button component
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Update plugins/woocommerce-blocks/assets/js/editor-components/switch-to-classic-shortcode-button/editor.scss
Co-authored-by: Niels Lange <info@nielslange.de>
* Refactor SwitchToClassicShortcodeButton component
* Fix css lint erros
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Add type property to notice events
* Refactor switch to classic shortcode button logic
* Use isCart for switchButtonLabel and snackbarLabel
* Remove empty div in sidebar compatibility notice component
* Refactor switch to classic shortcode button event handling
* Adjust wording
* Adjust marging and readability
* Introduce union for SwitchToClassicShortcodeButtonProps type prop
* Simplify logic
* Use proposed text
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Fix namespace
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* add: multiple select support to attribute dropdown
* fix: remove active filter from dropdown
* chore: remove unused extractBuiltinColor
---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Add e2e tests for image transition in Product Gallery block
* Create e2e tests for the Product Gallery block when it is inside the pop-up
* Add changelog
* Remove unnecessary lodash dependency import
* add: query filters count class
* chore: method comments
* refactor: rename class to QueryFilters
* fix: price filter count
* fix: price filter url
* chore: remove unnecessary transformation
* chore: remove unused meta query filter
* chore: put public methods on the top of the class
* fix: passing $wp_query
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* fix: stock query clause
* fix: handle and query type for attribute filter
* fix: ensure passing non null value to floor/ceil
* [Experimental] Collection Filter blocks: ensure the namespace is always rendered (#43112)
* fix: ensure the namespace is always rendered
* fix: target only wc queries
* fix: properly reset part of query to make new filter blocks work with Product Collection block
* Revert "Trigger event `experimental__woocommerce_blocks-cart-add-item` in the SSR Product Button vis Interactivity API (#42946)"
This reverts commit 4fec136da1.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update woocommerce.com URLs in documentation and code files
* Add changelog
* Fix github repository link in extend-rest-api-add-custom-fields.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Add github reporter (#42974)
* Add github reporter
* Add changelog
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Fix product task redirect to support grouped and external products (#43051)
* Rearrange product redirection logic to better accept grouped and external produc types
* Add changelog
* Modify feedback modal actions (#43005)
* Adapt feedback modal actions
* Add changelogs
* Modify comments
* Fix tests
* Fix test
* Update class-wc-gateway-bacs.php (#43054)
* Update class-wc-gateway-bacs.php
Fix typo in textdomain
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* [Product Block Editor]: Add `Linked product` tab (#43009)
* add linked-products to group IDs
* add Linked Products tab
* tweak hideConditions condition
* changelog
* fix typo in doc comment
* Introduce a product type selection within the new experience (#41823)
* Create a relation between the product type and the product block template
* Add 'patterns' to name the kind of products that can be created for a specific template
* Resolve template using its id as a template query param
* Rename ProductEditPattern to ProductTemplate
* Rename get_patterns hook to woocommerce_product_editor_get_product_templates
* Return the list of templates to the client
* Set layout template events as array
* Register the layout template based on the product template or the post type in case of product variations
* Registering non supported product types
* Create and register the woocommerce/product-details-section-description block
* Add the product type to the section description
* Create product type selector
* Fix menu item style
* Highlight selected menu item
* Set the selected product template
* Set product template title to lowercase in the content description
* Rename blocks by blockTemplates under the AbstractBlockTemplate class
* Rename to woocommerce_product_editor_product_templates filter
* Remove product_template_ prefix from the supported_product_types map
* Rename get_formatted to to_JSON and convert the props to client side like
* Refactor get_product_templates
* Fix icon resolution
* Add a confirmation modal for unsupported product templates
* Add changelog files
* Remove product types using for testing
* Fix redirection when changing to a non supported product template
* Set the change button state to busy when it is saving the product
* Fix php linter errors
* Fix rebase conflict
* Move ProductTemplate to Automattic\WooCommerce\Admin\Features\ProductBlockEditor namespace
* Add the to_json definition to the BlockTemplateInterface
* Create default product template by custom product type if it does not have a template associated yet
* Fix some comments and product template creation validation
* Add support to load the product template icon from an external resource
* Fix php linter
* Fix the changelog description
* [Experimental] Interactivity Dropdown multi-select mode, ratings filter and introduce each directive (#42981)
---------
Co-authored-by: David Arenas <david.arenas@automattic.com>
* Introduce the transient files engine (#42877)
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
* Change marketplace install API request to POST instead of GET (#43033)
* Change marketplace install API to using POST instead of GET
* Fix linting error
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Prep trunk for 8.6 cycle (#43021)
Prep trunk for 8.6 cycle with version bump to 8.6.0-dev
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
* Add Playwright tests for All Reviews, Reviews by Product and Reviews by Category blocks (#42903)
* Remove Reviews blocks Puppeteer tests
* Minor code cleanup
* Typos
* Create publishAndVisitPost() editor util
* Fix subcategories when importing products in Playwright and add reviews
* Add Reviews blocks tests in Playwright
* More typos
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Create a 'reviews' object in data.ts so we can store reviews data in one single place
* Update test so instead of creating a new post in each test, we go to the already-created post
* Add source comments to reviews data to match it with the script
---------
Co-authored-by: github-actions <github-actions@github.com>
* Release: Remove 8.5 change files (#43022)
Delete changelog files from 8.5 release
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Co-authored-by: Alex López <alex.lopez@automattic.com>
* Delete changelog files based on PR 43033 (#43079)
Delete changelog files for 43033
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
* Delete changelog files based on PR 43051 (#43081)
Delete changelog files for 43051
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
* Interactive Price Filter: use `context` instead of `state` (#42980)
* feat: use context instead of state
* fix: temporary move the context to inner element for diffing to work
* fix: update context before navigation for optimistic UI
* Load google analytics gtag script asynchronously in WooCommerce Blocks (#43040)
Co-authored-by: github-actions <github-actions@github.com>
* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build (#43074)
* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Revert "Fix schedule sales error" (#43094)
Revert "Fix schedule sales error (#42700)"
This reverts commit 9b800aa179.
* [Product Block Editor]: add Linked product sections. First approach. (#43013)
* add Linked products, Upsell section
* changelog
* add Cross-lens section
* add links to the Upsell sections
* changelog
* fix lint issues
* fix lint issus
* fix linting issue :-|
* check whether the linked product group is defined
* [Product Block Editor]: introduce ShoppingBags component (#43042)
* add ShoppingBags component
* Add ShoppingBag story
* changelog
* Fix: Collection data being leaked between Collection Filters blocks (#43044)
* fix: CYS - change heading color (#43076)
* fix: CYS - change heading color
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
* Delete changelog files based on PR 43074 (#43118)
Delete changelog files for 43074
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
* [Product Block Editor]: fix feature flag to hide the Linked products (#43119)
* fix flag to hide/show product editor
* changelog
* Add changelog
---------
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: louwie17 <lourensschep@gmail.com>
Co-authored-by: Fernando Marichal <fernando.marichal@automattic.com>
Co-authored-by: Marc Guay <marc.guay@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Damián Suárez <rdsuarez@gmail.com>
Co-authored-by: Maikel David Pérez Gómez <maikel.perez@automattic.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: Kyle Nel <22053773+kdevnel@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Co-authored-by: Alex López <alex.lopez@automattic.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
* Fix: Enable Pagination Block Visibility in Product Collection Block
This commit resolves an issue where the Pagination block was not visible in the block insertor within the Product Collection block.
- The core query pagination block name, initially hardcoded, is now declared as a constant `coreQueryPaginationBlockName` in `constants.ts`. This change not only improves code readability but also ensures consistency in using the block name across different files.
- In `index.tsx`, the `addProductCollectionBlockToParentOfPaginationBlock` utility function from `utils.tsx` is imported and executed. This function plays a crucial role in the fix. It dynamically adds the Product Collection block to the parent array of the Core Pagination block, ensuring the latter's visibility in the insertor when editing the Product Collection block.
- The utility function employs WordPress hooks and version checks to gracefully handle different WordPress environments. This careful approach maintains backward compatibility while addressing the current issue.
With these changes, merchants can now easily add a Pagination block from the insertor while working on the Product Collection block, enhancing the user experience and functionality.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update product query block templates with WooCommerce namespace
It modifies the `<wp:post-template>` block in multiple files to include a new attribute: `{"__woocommerceNamespace":"woocommerce/product-query/product-template"}`.
The inclusion of the `__woocommerceNamespace` attribute is a strategic enhancement, ensuring that these block templates are explicitly recognized as part of the WooCommerce namespace.
This fix the issue where migration from Products beta block to Product Collection block doesn't work properly.
* Fix linting error
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Migrate Backend mini-cart tests to Playwright
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Show rating stars for the cross-sells products
* Fix typo introduced in #43116 (#43148)
* Fix typo introduced in #43116
* Add changefile(s) from automation for the following project(s): @woocommerce/product-editor
---------
Co-authored-by: github-actions <github-actions@github.com>
---------
Co-authored-by: github-actions <github-actions@github.com>
* Migrate PR to Core
* Migrate test changes
* Add Custom Collection with inherit query attribute disabled
* Update copy of Product Catalog collection
* Don't choose default active collection in polaceholder and remove highlight
* Remove inherit query option from inspector controls
* Add collection names to Product Catalog and Custom one
* Unify Collection Chooser between Modal and Placeholder
* Bring back util removed by accident
* Replace the translations domain with woocommerce
* Remove leftovers after merge
* Add pagination and no results to Product Catalog and Custom collections
* Revert textdomain change
* Fix lint error
* Add changelog entry
* Change collection label
* Bring back Inherit query from template
* Remove Custom collection and bring back single Product Collection
* Simplify applying collection
* Make sure Inherit query from template is enabled in archive templates by default and disbaled in posts/pages
* Change incorrect Playwright locator
* Add test for Product Catalog inheriting the query in product archive
* Add tests for recommendation collection hiding the predefined filters
* Add reviews to multiple products
* Update expected products in Top Rated
* Remove rating creation in test env and skip undeterministic tests
* Add skip to Best Sellers test
* Update README.md
* Add more keywords to collections, like 'product collection' to recommendation collections
* Rephrase the README note about Collections registration
* Simplify types
* Rename unchangeableFilters to hideControls
* Fix typo in file name
* Remove 'pattern' references from toolbar files
* Replace hardcoded SCSS color with wc variable
* Remove changelog file from different PR
* Move hideControls to Product Collection ayttributes
* Improve responsiveness of columns in Product Collection Placeholder
* Use admin color pallette in Product Collection Placeholder
* Move Inherit query from template to the top of Inspector Controls
* Change the Collection prefix to woocommerce rather than woocommerce-blocks
* Simplify Placeholder and Modal styles