* Avoid duplicating the `/onboarding/themes/recommended` request
* Use `fetchActiveThemeHasMods` in the `fetchIntroData` function
* Add changefile(s) from automation for the following project(s): woocommerce
* WIP
* WIP
* WIP
* WIP
* Move the `activeThemeHasMods` to outside the `intro` key, since it's used also in other places
Refactor, add comments and cleanup
* Remove unnecessary log
* Set the `activeThemeHasMods` on the parent window to true after the design step to avoid having to fetch it again
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove unused import
* Add comment and ref to the new issue
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* 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
* Update webpack config
* Wrapper block type definition
* Separate fields from the hook block
* Hide when no custom fields exist
* Address and contact fields
* Shared form fields in settings
* Revert render_content to original
* Allow definition of unchecked value which includes a hidden field
* Move woocommerce_edit_account_form above password section, which should be last.
* My Account hooks
* Move account handling to service class
* Show fields in order details
* Remove unused prop
* remove comment
* Hook docblocks
* Add changefile(s) from automation for the following project(s): woocommerce
* Add note about nonce verification
* wp_kses_post for label
* fix nonce linting
* Add docblock to hook
* Bump template version
* Persist contact fields to customer
* Change action name
* Add changefile(s) from automation for the following project(s): woocommerce
* Changelog
* Margin fix on order confirmation for older core themes
* Bump version tags
---------
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
* WIP
* Add e2e tests for regular and custom templates
* Allow theme *.zip files for testing purposes
* Bump template versions
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Update comments in bash script
* Remove child themes - they will be installed from the zip
* Fix lint error re spacing
* Bump template versions
* Update PHP unit tests for classic style notices
* Revert "Remove child themes - they will be installed from the zip"
This reverts commit 98b1036616.
* Remove classic cart check in test
* Revert "Add e2e tests for regular and custom templates"
This reverts commit ef531854f9.
* Revert test-related changes
* Remove report
* Prevent phpcs warning for not escaped output
It is escaped in the wc_get_notice_data_attr function
* Revert notice changes to core E2E tests
* Update shopper add to cart e2e test to use correct notice class
* Update checkout block E2E test to use correct notice class
* Fix typo
* Update test to check for correct notice classes
* Update notice comment
* Re-apply block template overrides
* Consistent notice check with other templates
---------
Co-authored-by: Niels Lange <info@nielslange.de>
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>
* Move the guest should verify email logic to the order class
* Refactor for readability and remove redundant code
* Use billing email variable
* Remove white space
* Rename and move email_is_valid to users utils
* Use global WC_DateTime and WC_Session classes
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* use text-area for variation desctiption field
* changelog
* tweak // Translators string
* use var to define textarea border color
* remove optional from description label
* Change local workers to 1
* Add helpers for adding shipping
* Add shipping zone before order
* Fix tax assertion
* Fix assertion
* Tightened up locators
* Dismiss tour if visible
* Back to function
* Update tax label
* Enable shipping
* Update locator
* Changelog
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* avoid crash when Gutenberg is not installed
* add issue link
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add completed order email test
Add test structure to verify completed order email arrival and content
* Verify Email JSON Content
Parse email content in JSON format
* Record email content in JSON
Record email content in JSON
* Update emails completed order checks
Added checks to verify the content of completed order's emails
* Add changefile(s) from automation for the following project(s): woocommerce
* Update email content const & remove duplicated test
Updated with a new const to record email content const and removed duplicated assertion.
---------
Co-authored-by: github-actions <github-actions@github.com>
* Create DownloadableProductTrait for common downloadable blocks creation
* Use DownloadableProductTrait in SimpleProductTemplate
* Use DownloadableProductTrait in ProductVariationTemplate
* Remeber downloadable files in product variations
* Add changelog file
* Fix php linter error
* Unlink downloads and downloadable product props so they can be managed separately
* Remove invalid margin bottom from the uploader label
* Add changelog file
* Make legacy data cleanup more performant
* Add legacy data cleanup processor
* Make legacy cleanup available in the UI
* Add some validation around data synchronizer / data cleanup settings
* Add some error handling
* Add changelog
* Make CI happy
* Improve option handling
* Add unit tests
* Partially revert “real time” cleanup
* Re-schedule cleanup on ‘shutdown’ if necessary
* Revert CSS changes for HPOS settings screen
* Revert JS changes for HPOS settings screen
* Allow tools to display a status text
* Move order cleanup to Tools
* PHPCS fixes
* Extend bail early protection to other batch processing functions
* Log and stop cleanup when a full batch fails
* Make PHPCS happy
* 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>
* CYS - Core: add integration with the font library
* install font only when necessary
* refactor logic
* add try catch
* renaming font
* refactor some code
* refactor some logic
* Add changefile(s) from automation for the following project(s): woocommerce
* remove not used import
* avoid mutability
* improve performance
* update name variable
* fix naming
* fix endpoints after font collection rest controller improvements
* use promise.all into the map
* improve performance
* fix lint error
---------
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
* Always show Variation options and Variations sections within the Variations tab
* Remove woocommerce/product-variations-fields block since it's not needed anymore
* Create ProductTShirt image for variation options empty state
* Add renderCustomEmptyState to the attribute control component to be able to set a not default empty state
* Render a custom empty state for variation options
* Adds defaultSearch prop to NewAttributeModal so it can be used to start searching right after the modal is shown
* Let the empty state adds an attribute that matches a given text
* Add changelog files
* Fix linter errors
* Ensure that the Font Library is available
* Add changefile(s) from automation for the following project(s): woocommerce
* fix iframe issue
* improve comment
* don't return any object
---------
Co-authored-by: github-actions <github-actions@github.com>
* 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>
* Apply Rector suggestions
* Add changefile(s) from automation for the following project(s): woocommerce
* Restore false positive
$missing_tables will always be an array
* Restore false positive.
Rector issue: AddDefaultValueForUndefinedVariableRector.
This time the early return is valid so there’s no need to move the $process_limit assignment to the top.
* Ask if $orders is an array
$orders is used as an array lines below. Add `is_array` just in case the “paginate” param is used which would change $orders to an object.
* Check if variable is array
Simplifies variable check given that they are used as an array lines below.
* Restore code as taxes is always an array
* Restore false positive
In the previous loop the $data variable is being built as an array of arrays. Then $value in this loop will allways be array.
* Restore false positive
get_children’s method. of a WC_Product instance will always return an array.
* Simplify variable check
Ask if varialbe is array since it only can be array or false.
* Restore false positive
WC_Blocks_Utils::get_blocks_from_page() will always return an array.
* Restore false positive
There’s a check asking if $existing_meta_data[ $meta_data->key ] is array.
* Restore false positive
$child_ids will always be an array.
* Restore false positives
WC_Product->get_visible_children() will always return an array.
* Restore false positives
WC_Product->get_children() will always return an array.
* Restore false positive
WC_Product->get_visible_children() will always return an array.
* Restore false positive
WC_Order->get_items() will always return an array.
* Restore false positive
The get_matching_rates private method will always return an array.
Updated the @return declaration to be an array instead of boolean.
* Remove unnecessary array type casting.
* Restore false positive
$this->get_children() will always return an array.
* Fix lint issues
* Remove unnecessary default assignment
* Remove unnecessary is_array check
* Remove unnecessary is_array check
* Remove unnecessary is_array check
* Change default value from null to false
* Remove unnecessary is_array check
* Update changelog entry
* Update changelog entry
* Update changelog entry
* Add changefile(s) from automation for the following project(s): woocommerce
* Update changelog entry
* Use self for consistency
---------
Co-authored-by: github-actions <github-actions@github.com>
* Marketplace: Fix the bug hiding connection hiding
Actually, this bug causes all modal state to be lost. But since we
check the connection only when the page loads, on a subsequent tries, we can 't show the connection warning.
* Marketplace: update documentation and typos
* Add changefile(s) from automation for the following project(s): woocommerce
---------
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>
* Adds tests to monitor number of JS files included in pages
* Changelog
* Update file counts
* Changed assertion to LTE
* Revise file counts
* Update numbers
* Increased numbers
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Store API: fix link documentation
* Add changefile(s) from automation for the following project(s): woocommerce
* fix lint error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update the CYS intro modal copy on Core
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Create a dedicated survey and tracking events for the CYS flow on core
* Update booleans to show button and survey
* Remove console log
* Add changefile(s) from automation for the following project(s): woocommerce
* Style required question asterisk and make the questions required
* Fix lint error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fetch the ai status on the transitional page of the CYS flow
* Only check AI status on WooExpress
* Add changefile(s) from automation for the following project(s): woocommerce
---------
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>
* Remove Cart and Checkouts templates migration code
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* add draft test
* test unserializing an order meta with an object of a non-existent class
* appease the linter
* add asserts for the $meta's object_vars
* linter fix
* we actually don't need these to force a sync
* add one to time to avoid potential flakiness
* use simpler fetch for order
* catch the errors and do things manually via wpdb instead
* appease the linter
* add changelog file
* specify format for the insert
* add test for deleting meta
* detect incomplete class in meta value instead of catching and examining errors
* appease the linter
* fix typo
* address review comments
* empty cache when we have manually deleted the post meta
* use `is_object`
* add logging
* log the order ID
* Update README.md
Add a link to the WooCommerce Monorepo prerequisites before going through the e2e-pw prerequisites.
* Update WC prerequisites to relative link and added changelog
Update link to WC monorepo prerequisites
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove duplicated lines
Remove duplicated instructions and leave the step to install Docker and Docker compose
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
* Check for string values when updating chosen_shipping_methods session
* Ensure filtering woocommerce_shipping_chosen_method provides a string value
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add wireit build config for wooai plugin
* Add changefile(s) from automation for the following project(s): woo-ai
* Add lint config for woo-ai plugin js and css
* Remove build:admin script for wooai
* Remove ci config for woo-ai
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add new "can receive cancelled order email" test
* Add new "can receive cancelled order email" test
* Add changefile(s) from automation for the following project(s): woocommerce
* temp: wait for 1s
* temp: wait for 1s
* Revert changes introduced in 5aa5013
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add "can view product review" test
* Add changefile(s) from automation for the following project(s): woocommerce
* Add timestamp to reviewer's email
* Verify reviewer's email and rating
---------
Co-authored-by: github-actions <github-actions@github.com>
Adds logs settings values to both the SSR REST API endpoint and to the
HTML version of the SSR screen. Also adds a new method for calculating
the total size of the log directory, and adds that info to the Logs
Settings screen in addition to the SSR.
* Make `get_allowed_countries` default to `all`
* Make `get_shipping_countries` handle `disabled` and apply filter on all cases
* Add changefile(s) from automation for the following project(s): woocommerce
* changelog
* Put option in variable to avoid multiple calls
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update create simple product
Add steps that add description, sale price, SKU, purchase note and an attribute (Color)
* Update add-virtual-product formatting and locators
Update add-virtual-product tests with suggested formatting and locators
* Add changelog file
Adding the missing changelog file via pnpm --filter=plugin-woocommerce run changelog add
* Update locators with getBy on product creation
Update product name, price, sale price and virtual checkbox marking locators to use getBy instead
* Update SKU and publish locators with getBy instead
Updated SKU and publish locators with getBy instead
* Added asserts to create-virtual-prd test
Added asserts to create-virtual-prorduct test
* Update SKU check
Update SKU assertion
* Remove keyboard action
Remove press enter keyboard action
* Add changelog
Added changelog file
* Add changefile(s) from automation for the following project(s): woocommerce
* Update virtualProductName check
Update virtualProductName check to the const instead of the string
* Rebase and format
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Veljko <veljano@yahoo.com>
In #43166 I changed the way that row classes are added on settings
fields. However, by using `esc_html`, it's actually outputting invalid
HTML, where the double quote wrappers are getting converted to HTML
entities. This simply switches back to escaping only the attribute value
and not worrying if the tr element contains an empty class attribute.
* 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>
* Create session on the order pay page
* Add changefile(s) from automation for the following project(s): woocommerce
* changelog
---------
Co-authored-by: github-actions <github-actions@github.com>
* Return error when the product creation fails
* Add changefile(s) from automation for the following project(s): woocommerce
* Continue with product creation even when the image upload fails
* Revert
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Add a warning message with the error when creating the products with no images
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add filters for customer email and order id for performance.
* Empty where should not cause invalid query.
* Add changelog.
* Add unit test for newly supported search params.
* Apply coding standards.
* Add a trailing wildcard to allow broader search.
* Remove extra line.
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
* Marketplace: Add "Add to Store" button for free and WordPress.org products (#43616)
* Marketplace: Install free .org plugins with Add to Store button
* Marketplace: addressed feedback for the the new install free products flow
- Moved notices to the top of the modal
- Updated notice styles slightly
- Updated the CreateOrderSuccessResponse to reflect API changes
* Marketplace: Require the Helper orders API file
* Marketplace: fix linter errors
* Marketplace: form encode when submitting the request
The body is encoded anyways by the WordPress core. However, if I don't
do it here, I can't create a valid signature to be verified by
Woo.com.
I could have just submitted a JSON too, but this seamed easier since
the body is parsed on Woo.com automatically when it's in this form.
* Add changefile(s) from automation for the following project(s): woocommerce
* Marketplace: remove "~" character in imports and use relative paths
* Marketplace: fix margins in the product with the Add to Store button
* Marketplace: Add conditions to hide the button
We hide it if:
- the product is already installed
- user doesn't have the right capability
- if the product is just installed using our flow and there is
no page refresh
* Marketplace: don't show Add to Store button on Themes and on Discover
* Marketplace: fix linting
* Marketplace: hide ratings from the product if "is-small" class exists
* Marketplace: fix linting errors
---------
Co-authored-by: github-actions <github-actions@github.com>
Resolve conditional dependency in JS.
Fixes#43829
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.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>
* Sync country name to Klaviyo and Mailchimp
* Add state name
* Add changefile(s) from automation for the following project(s): woocommerce
---------
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>
* Import media on environment setup
* Add product-images.spec with one complete test and all other skeleton tests
* Add changelog
* Implement can update the product image
* Implement can delete the product image
* Implement can delete the product image
* Skip not implemented test
* Merge fixtures
* Add productWithImage fixture
* Remove unused variable `api`
* Partial implementation of can create a product gallery
* Check the image gallery in store frontend
* Added `can update a product gallery` test
* Run all tests
* Search for image in media library
* Check that the remove gallery image is not displayed
* Add repeatEach configuration
* eslint formatting
* Extract some repeating steps into a function
* Update check for thumbnail
* Fix test image name
* The previously uploaded file should re-appear when the product changes from downloadable to not and then back again
* Add changelog file
* Fix php linter error
* Initial changes to fix the toolbar in the iframe editor
* Moved toolbar to header and respect fixedToolbar preference
* Only render Gutenberg toolbar with specific version
* Update GB version
* Fix build issue
* Add fixed toolbar menu
* Remove unused import
* Add changelogs
* Fix lint errors
* Fix PHP lint error
* Add Include downloads to show/hide the Downloads section
* Fix margin top for none first child nested sections
* Add changelog files
* Fix php linter errors
* Redirect to intro screen if theme is not modified
* Add changefile(s) from automation for the following project(s): woocommerce
* Add and fix test for the redirection
* Redirect with the proper url 'intro'
* Remove only
* Avoid completing the cys task when switching themes
* Revert prev commit and reset `woocommerce_admin_customize_store_completed` before each test
* Set the `woocommerce_admin_customize_store_completed` to `no` before each test
---------
Co-authored-by: github-actions <github-actions@github.com>
* PHP 8 Updates for src/Internal
* Add changelog entry
* Fix PHP lint issues
* Add unit test for not in queries.
---------
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
* Rename order attribution template file
* Update OA field name to `source_type` to keep up with https://github.com/woocommerce/woocommerce/pull/41690
* Discard conditional UTM labels altogether
---------
Co-authored-by: Tomek Wytrębowicz <tomalecpub@gmail.com>
* init approach of related products endpoint
* register related prodducts endpoint
* rename response prop with ids
* filter categoris from endpoint params
* filter categories when pulling related products
* changelog
* extend from WC_REST_CRUD_Controller class
* iterate over defininf endpoint params
* doc
* merge product terms with params
* introduce `combine` param
* return products collection instead of plain array
* fixinf eslint issues
* pass proper fn args to bound fns
* do not call parent register method
* post type is defined by parent controller class
* remove related products controller
* extend products controller with `related-products`endpoint
* filter post__in param
* when no related products found return empty array
* change and register endpoint params
* remove commented line
* add a custom method to extend the params
* update
* fix typo
* ensure to respect the products limit
* fix eslint issue
* remove unrequired endpoint id param
* 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>
* 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
* Update webpack config
* Wrapper block type definition
* Separate fields from the hook block
* Hide when no custom fields exist
* Address and contact fields
* Shared form fields in settings
* Revert render_content to original
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Get default attributes on front end
* Add initial sections to email templates
* Revert "Get default attributes on front end"
This reverts commit f76c21617a2c5ad832d4579ba2c4c8e98afd440d.
* Also render contact fields
* Handle plain text
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Unwanted changes from rebase
* Use get_order_additional_fields_with_values
* Remove sample fields
* Version bump for styles
* Update plugins/woocommerce/includes/class-wc-emails.php
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update plugins/woocommerce/includes/class-wc-emails.php
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Apply view context
* Handle null
* Context
---------
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* 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
* Fix handling the error from the `product_image_upload` function
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix linting errors
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add changelog and update var naming in block tests
* Format code in two tests
* Add missing payment method set to the test
* Refactor tests and merge cart checkout coupons
* Clear cookies before every test
* 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
* Update webpack config
* Wrapper block type definition
* Separate fields from the hook block
* Hide when no custom fields exist
* Address and contact fields
* Shared form fields in settings
* Revert render_content to original
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Show address placeholders
* View fields in admin
* Pass order object and context to field hooks in WP admin
* CheckoutFieldsAdmin class
* Move logic to CheckoutFieldsAdmin
* Implement context
* Style checkboxes correctly in meta box
* Update handling
* Undo change to changelog
* Correct docblock comment for woocommerce_admin_shipping_fields
* Document context
* No need to init fields
* Fix checkbox handling for bw compat reasons
* Add changefile(s) from automation for the following project(s): woocommerce
* Force CI
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix CSS rule
---------
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
* Changelog
* Tests for restricted coupons
* Update to test checkout not cart… which is what I should have been using
* Removal -- from PR feedback
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Fix activity panel showing incorrect currency
* Add changefile(s) from automation for the following project(s): woocommerce
* Use store currency setting when order currency is different from the store currency
---------
Co-authored-by: github-actions <github-actions@github.com>
* Vanilla .animate() instead of jQuery .fadeIn()
* Slider .animate() keyframes are now a list with 2 objects
[{ marginLeft: old }, { marginLeft: new }] keyframe syntax instead of
{ marginLeft: [old, new] } keyframe syntax for consistency
* Changelog
* Tweak changelog.
---------
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Add sales property to MarketingCampaign class.
* Return campaign sales data in API.
* Display Sales in Campaigns card.
* Fix test for useCampaigns.
* Display a "-" when there are no cost or sales value in Campaigns card.
* Add changelog.
* Fix test for useCampaigns hook.
* Fix PHP lint issue.
* 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>
* CYS - Core: add unit test
* Add changefile(s) from automation for the following project(s): woocommerce
* fix description
* Enable TT4 when the customize your store process starts
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add refund order to unit test.
* Remove buggy defensive check since existance of order is already verified.
* Changelog.
* PHPCS fixes.
* Added more assertions after cleanup to verify cleanup worked.
* 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
* Add the UX element dropdown for search box.
* Add unit test for search_filter param.
* Add support for search filter in search query for better performance.
* Link search_filter dropdown with query param.
* Fix conflicts.
* Reformat to allow adding more filters in future.
* Fixing margin in the search filter box.
* Fix merge conflict.
* Apply linting.
* Add changelog.
* Apply PR suggestions.
* Grammer fixes.
* 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>
* CYS - Core: add unit test
* Add changefile(s) from automation for the following project(s): woocommerce
* fix description
---------
Co-authored-by: github-actions <github-actions@github.com>