* 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>
* Fix PHP warning related to logging default severity threshold
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Force marketing menu items order.
* Add changelog.
* Make sure that Overwiev is present.
* Coupons should be always second.
* Update plugins/woocommerce/src/Internal/Admin/Marketing.php
Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>
* Update plugins/woocommerce/src/Internal/Admin/Marketing.php
Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>
* Use fallback for different languages.
* Use location as a fallback for names.
* Fix linting.
* Refactor.
* Remove unneded new line.
* Remove duplicated code.
---------
Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>
* Add MarketingRecommendations feature.
The code here is based on other feature with default fallbacks and with data source poller, e.g. see payment gateway suggestions.
* Use MarketingRecommendations feature in API.
* Add spec_key for MarketingRecommendationsDataSourcePoller.
If we don't specify it, the default is `id`, which is not used in our recommendation data, and this will cause things not to work as expected.
* Recursively convert object to array.
This is because all the subsequent functions work with arrays, not objects.
* Make recommended marketing tools and coupons use MarketingRecommendationsInit.
This is so that recommended channels, tools, and coupons make use of the same transient data with data source poller.
* Add changelog.
* Fix PHP lint issues.
* Add doc comment to fix lint error.
* Fix tests in MarketingRecommendationsTest.
* Replace recommendations.json file with generated data in DefaultMarketingRecommendations.
This is to have i18n support.
* Add icons for fallback marketing recommendations.
* Fix PHP linting issue.
* Fix linting issue.
* Fix failing tests with PHP 8.0.
* Remove unused replaced code in MarketingSpecs.
* Delete old marketing recommendations transient upon update to WC 8.6.0.
* Add changelog.
* 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
* Add MarketingRecommendations feature.
The code here is based on other feature with default fallbacks and with data source poller, e.g. see payment gateway suggestions.
* Use MarketingRecommendations feature in API.
* Add spec_key for MarketingRecommendationsDataSourcePoller.
If we don't specify it, the default is `id`, which is not used in our recommendation data, and this will cause things not to work as expected.
* Recursively convert object to array.
This is because all the subsequent functions work with arrays, not objects.
* Make recommended marketing tools and coupons use MarketingRecommendationsInit.
This is so that recommended channels, tools, and coupons make use of the same transient data with data source poller.
* Add changelog.
* Fix PHP lint issues.
* Add doc comment to fix lint error.
* Fix tests in MarketingRecommendationsTest.
* Replace recommendations.json file with generated data in DefaultMarketingRecommendations.
This is to have i18n support.
* Add icons for fallback marketing recommendations.
* Fix PHP linting issue.
* Fix linting issue.
* Fix failing tests with PHP 8.0.
* Remove unused replaced code in MarketingSpecs.
* Remove unneeded false check.
This is because `is_array` would return `false` when `false` is being passed as the argument.
Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>
---------
Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>
* Do not access change_feature_enable() statically. Closes#43175. Copy of @helgatheviking's cd71d08577.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Centralize log level labels
* Fire an action specific to loading the Logs tab
* Functional settings screen (no way to navigate to it yet)
* Deprecate wc_register_default_log_handler
* Hook up the settings
* Add section nav
* Add an action hook to the settings form
* Rename render_page method to render_form
* Scaffold the unit tests
* Remove logging enabled check from WC_Logger construct
Caching the enabled setting value turns out to not be a great idea,
it breaks some tests, and could cause issues if the setting value
changes, and then a logging event happens later in the same request.
WP has its own caching layer for options anyway, but one that will
update if the value of the option changes. So this just makes the
enabled check directly from the should_handle method.
* Add most unit tests. Still needs a couple more
* Add remaining unit tests
* Update since values on new hooks to 8.6.0
* phpcs cleanup
* Change deprecated tag from 8.5.0 to 8.6.0
* Add missing return types to unit tests
* Add changelog file
* Add missing clear method to new log file handler
* Change level_threshold default value to 'none'
* Ensure logger has a valid level threshold set, regardless of level given
* Update legacy unit test
* Ensure settings only saved on settings view
* Add settings sections for filesystem and database
Also add a filesystem setting for collapsing log entry lines.
* Add public LoggingUtil class for external usage, and use in WC_Logger
* Remove unused import
* Deprecate wc_get_log_file_path and wc_get_log_file_name
* Preserve white space in log file lines
It turns out that several extensions add log entries that are just
a print_r of an array. Preserving the white space is important for
making this data legible (ideally they'd switch to adding this data
within the context parameter)
* More legacy unit test fixes
* Remove entry collapse option and functionality
It's unclear right now that entry collapsing provides much real
benefit, while it clearly does have some potential drawbacks if
extensions are in use that add print_r output to the log files.
* phpcs cleanup
* Yet more unit test tweaks
* Remove unused code
* Don't wrap extra handler options in <code>, it gets excaped
* Attempt fix for WC_Tests_Logger::test_clear
This is only failing on GH CI, not when running locally. Maybe
ensuring all the created log files are deleted will help.
* Improve logging of fatal errors
This improves the formatting of error messages caught and logged
during shutdown to be more legible and to take advantage of the
logging method's context parameter. With this change, the log entry
will be a simple message on one line, and any stack trace will be
available but hidden in an "Additional context" details element.
* Tweaks to some settings' wording
* Update webooks link to logs, undeprecate
* Remove `realpath` usage since it deos not work if log directory does not already exists.
---------
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
* Remove custom styles from button
* Avoid php warning about images and slug not defined
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix linting errors
---------
Co-authored-by: github-actions <github-actions@github.com>
* Redirect supported product types to the new experience based on the product template associated to it
* Add changelog file
* Fix linter error
* Redirect using the product type first and then the associated product template
* Set the product template id also for unsupported product templates
* Add changelog file
* Remove supported_product_types from the RedirectionController since the product_templates is used instead
* Fix php linter error
* Remove v1 of plugin installer.
* Rename WC_REST_WCCOM_Site_Installer_Controller_V2 into WC_REST_WCCOM_Site_Installer_Controller.
* - Create base controller for WCCOM Site requests, extended by Installer and SSR controllers.
- Switch get SSR endpoint to v2 namespace.
* Remove namespace property from Installer controller.
* Linting.
* Add changefile(s) from automation for the following project(s): woocommerce
* Switch request method of reset install endpoint to POST (#43150)
- Switch reset installation state request to POST.
- Change wccom-site API namespace to v3.
* Exclude deleted files from linter check (#43355)
Exclude deleted files from linter check.
---------
Co-authored-by: github-actions <github-actions@github.com>
* 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 "rm: .git/hooks: No such file or directory" error in `pnpm install`.
* Add changelog.
* Use "rm -rf" instead of "test" command on .git/hooks directory.
We use the "-f" flag so that it does not throw error when the directory does not exist.
* Try reducing blocks build size
* Add changefile(s) from automation for the following project(s): woocommerce
* Only set NODE_ENV if its not already defined
---------
Co-authored-by: github-actions <github-actions@github.com>
- Use `referrer` & `source_type` field names consistently
Remove the need to translate it back and forth.
- Make fields actually extendable using `wc_order_attribution_tracking_fields`.
Propagate the field configuration to the client side as well.
Disambiguate fields in variables and functions.
Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
* Add product search field to the linked product list block
* Add empty state to the linked product list block
* Fix AdviceCard styles
* Create skeleton for the linked product list block
* Fix linter errors
* Move the product list skeleton to the product list component folder
* Revert AdviceCard changes
* Remove upsells and cross-sells block to use linked-product-list block instead
* Add changelog files
* Hide sale badge if product image is disabled
* Fix css target to cover all product grid
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Hide on sale badge via PHP side
* Remove css changes
---------
Co-authored-by: github-actions <github-actions@github.com>
* Return the correct empty images response
* Use the correct structure in the images endpoint response
* Add changefile(s) from automation for the following project(s): woocommerce
* Throw error when no images and the store is already ai generated
---------
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>
* Fix commands with tags breaking the command palette
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>