* 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>
* 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>
* introduce `mode` attribute
* move block props to wrapper el
* render plain text mode
* minor const name change
* changelog
* add toolbar buttons only in rich-text mode
* set rich-text mode as default
* 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>
* moving webhooks doc
* Move webhooks doc to building a woo store
It's not really extension development related
* Update docs manifest
---------
Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
* 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>