* CYS - select the right font with AI offline
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS - reset products and pattern when the site doesn't have AI generated content
* Add changefile(s) from automation for the following project(s): woocommerce
* fix lint
---------
Co-authored-by: github-actions <github-actions@github.com>
* Trigger event experimental__woocommerce_blocks-cart-add-item in the SSR Product Button vis Interactivity API
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Update code comment and add reference to the followup issue
---------
Co-authored-by: github-actions <github-actions@github.com>
* Installer url API
* Redirect if installer not available
* Remove paid product autoinstall support
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add logging and admin noticing for rest api usages
Two new settings are added (UI in the Legacy API settings page):
- woocommerce_legacy_api_log_enabled
- woocommerce_legacy_api_usage_notice_enabled
When any of the two are enabled, legacy API usages are stored
in two options, 'wc_legacy_rest_usages' and 'wc_legacy_rest_last_usage'.
'wc_legacy_rest_usages' is a dictionary keyed by user agent,
each entry is in turn a dictionary keyed by request route,
items are arrays containing first and last usage dates as well
as total usages count (API version is logged too but for simplicity
it's not used to key the data).
'wc_legacy_rest_last_usage' contains the entry for the last usage,
regardless of user agent and route. It's used to display the notice.
When 'woocommerce_legacy_api_usage_notice_enabled' is enabled,
and the 'wc_legacy_rest_last_usage' option exists, an admin notice
displaying its contents is shown.
* Add changelog file
* Linting fixes
* Fix unit test
* Simplify the approach to logging/noticing:
- Remove settings
- Use a transient instead of an option for temporary data
- Store temporary data by user agent but not by route
- Make the admin notice dismissable
- Don't log now show the notice if the legacy REST API extension
is installed and active
- Add a filter to explicitly disable the logging
* Small fixes, including a missing "exit" after request processing
* Apply suggestions from code review
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
* Fix linting issues
* Update the warning text under the "Enable legacy REST API" setting
* Change the rules to display the notice.
Now it won't appear if the transient isn't available
or if the Legacy REST API is disabled (or if the Legacy REST API
extension is active, as before); but if the user hasn't
explicitly dismissed the notice it will appear again if the transient
is recreated or the Legacy REST API is enabled again.
---------
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
* Add the source type / origin of "Web admin" for orders created in admin
* Include "Web admin" in values for Order information metabox
* Include "Web admin" value for the Order information metabox
* Use the Order Origin meta value in the Origin column of the Orders table
* Add web admin and direct as origin values, and a flag for un/translated
* Use the untranslated origin_label value in Tracks
* Don't store the origin label in the database to allow better l10n
* Lowercase origin label in Tracks
* Empty label and Direct or Web admin as source for orders table column
* Better Tracks customer order count and include customer status
* Add changelog
* Update test to expect Unknown
* Remove short ternary
* Change OA meta box title to Order Attribution
* Use native order method `get_total_refunded`
* Simplify origin labels - use the same value for Orders Edit and table
* Correct imprecise doc comment.
* Improve customer order count and total spend calculation
* Make default label "Unknown" (for pre-OA orders, for example)
* Update tests to match new labels
* Hide Marketplace feature toggle UI
* Ensure marketplace feature is active in DB on all sites
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove duplicated text
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Don't access the keys of what is now just an array
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Adds missing aria-label and tabindex HTML attributes to the Help tip element for "Product data" on "Add new product" page.
* Escape HTML tags
* Added changelog
* Update comment
* Amend method for selecting "New attribute" placeholder.
* Restore use of `getByRole()` and select first instance (two are being matched, in some cases).
* Use last match (in some test runs, `getByRole()` is unexpectedly matching more than 1 heading.
---------
Co-authored-by: Sagar Tamang <mi5t4n@gmail.com>
* docs: Compatibility Layer - update documentation about woocommerce_single_product_summary
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Reviews by Product block: fix encoded in input aria-label
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Make extended fields optional in Store API
* add tests
* add changelog
* update logic in validate function
---------
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* add: active filters block
* update text domain
* chore: linting
* use template string instead of concat
* add experimental flag to register block type calls
* chore: update comments
* feat: register active rating filter data
* fix: unique navigation id when collection filters are added outside product collection
* fix: active filter rating id
* fix: return the href
* chore: phpcs
* Introduce `LegacyDataHandler` for handling legacy orders in the HPOS datastore
* Add methods to count and obtain orders subject to cleanup
* First pass at metadata cleanup for orders
* Add unit tests
* Implement `wc hpos cleanup` CLI tool
* Make PHPCS happy
* Add changelog
* Change error to warning
* Improve tests
* Fix unit tests
* Allow cleaning up of placeholders with meta
* Add support for `--force` flag
* Update plugins/woocommerce/changelog/enhancement-41914
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Update plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Update plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Exclude auto-draft
---------
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.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
* 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
* 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
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* add mask-image
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Allow for line breaks within log messages so they can be easier to read when they contain a lot of content.
Based on a suggestion in #27758
Co-authored-by: Moritz Meißelbach <4208996+Biont@users.noreply.github.com>
This fleshes out the LogHandlerFileV2 class that was introduced back in #40662. It no longer extends the original file log handler, but works as a standalone. To realize the improvements in the handler class, lots of improvements are also made to the File and FileController classes.
Notable enhancements in this handler class vs the original one:
* Better algorithm for determining the "source" of a log entry when none is provided.
* Normalizes the source property of a log entry so that variations in capitalization will still result in the same value.
* Improves file rotation behavior so that it will consistently increment each rotation up by one.
* Formats log messages to remove line breaks, so that each line of a log file is an entire entry.
* To complement this, data from the $context parameter is added to the log entries, and displayed in the log file viewer as prettified JSON, hidden behind a `<details>` element. Thus, each log entry can be expanded to show the context data, but it won't dominate the screen in the log viewer by default.
Fixes#41561
* Extract 'downloadable product' class and include it for API endpoint calls as well
* Re-add mediauploader component
* Restore UploadFilesMenuItem
* Provide additionalData type
* Restore MediaUploader component
* Lint PHP
* Add changelogs
* Update pnpm-lock
* Revert "Update pnpm-lock"
This reverts commit b61ee5813aa0b7b8b1ea8e71423bedbb6f876139.
* Revert pnpm-lock.yaml
* Fix unit tests
* Use WC_ABSPATH
* Revert "k6 perf tests: Fix parsing of COT/HPOS environment variable (#40930)"
This reverts commit 50c56d8427, reversing
changes made to cbc3bac88c.
* Address potential rXSS vulnerability in the product-reviews-have-moved notice.
* Changelog.
* Restore button-based approach for notice dismissal.
In the context of this edit comments screen, it looks better as a button (than as a link, which would require extra CSS to support).
* Tidy.
* Update tests: reviews-have-moved notice HTML has been updated.
* Modify form-based approach following code-review feedback.
---------
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
* add matching image by sku exp feature
* attach featured image in rest api
* add CSV import support
* include changelog
* update from feedback- move to products advanced settings
* address phpcs
* bump @since to 8.5.0
---------
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
* Add tracking when opening or searching in the Command Palette
* Add changefile(s) from automation for the following project(s): woocommerce
* Add 'origin' property to all Command Palette events
---------
Co-authored-by: github-actions <github-actions@github.com>
* Marketplace: refresh subscriptions in if "install" parameter exists
* Marketplace: handle loadSubscriptions or refreshSubscriptions failing
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073
* revert test to what it was
* Default to text, if the type supplied is not supported throw an error
* Add type for options
* Return null if somehow the select made it through without options
* Make select fields type enum and add options to schema
* Lint fixes
* Update plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/address-form/address-form.tsx
Co-authored-by: Niels Lange <info@nielslange.de>
* Update plugins/woocommerce/src/Blocks/Domain/Services/CheckoutFields.php
Co-authored-by: Niels Lange <info@nielslange.de>
* Update checks to log errors and fail gracefully
* Add field id to class names
* Fix lint error
* Fix short array use
* Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073
* Default to text, if the type supplied is not supported throw an error
* Lint fixes
* Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073
* add support for registering checkboxes
* remove extra error log
* add styling
* fix rebase conflit
* fix rebase conflit 2
* fix linter errors
* address review comments
* add warning for checkbox
* fix changes
---------
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Remove padding for the products query with background
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
* First pass at Playwright test migration
* Set working directory
* Remove exec
* Configure the environment before testing
* Remove filter
* Update paths for tests
* Try explicitly stating working-directory
* Change tests directory
* Try running all tests
* Uncommented project
* Update commands to run tests
* Comment out env config
* Uncomment
* Changelog
* Set up multiple test configurations
* Update failing test
* Update paths for artifacts
* Update path to artifacts
* Path to results
* remove unnecessary file
* Skip translation E2E tests
Skipping translation tests until we fix the missing translations issues after we changed the domain to "woocommerce"
* Update the artifacts path
* Fix lint errors
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Add the response_format to the params for requests to AI to ensure it will return the responses in JSON format.
* Update the prompt to define the search term for images from Pexels.
* Streamline product content update and the product image uploads within the ProductUpdater class.
* IMprove prompts for images and product content generation.
* Update the prompt for defining the search term on Pexels and drop double quotes from the response.
* Update the prompts and the position for the titles on content generation for the woocommerce-blocks/testimonials-3-columns pattern.
* Set the 'woocommerce_ai_managed_images' transient for the products endpoint callback in case execution is interrupted so images don't have to be fetched from Pexels again.
* Update the prompt for defining the search term for images.
* Remove unused methods from the PatternsHelper class.
* Update the prompt for AI content generation in patterns.
* Update the prompts for the testimonials and the Hero Product 3 Split patterns.
* Update the position for the main title in the Hero Product 3 Split pattern.
* Reduce the size of the images uploaded to the media library for products.
* Add docblock and update prompts.
* Update the default size of the images received from Pexels to be downloaded and uploaded to the media library.
* Update prompts for the Hero Product 3 Split pattern.
* Add changefile(s) from automation for the following project(s): woocommerce
* Address lint errors.
* Update array formatting
---------
Co-authored-by: github-actions <github-actions@github.com>