Commit Graph

65013 Commits

Author SHA1 Message Date
Gabriel Manussakis 0223715af6
[Accessibility] Fix address heading level on My Account page (#49764)
* Change address title from h3 to h2 on my account

* Bump up my-address template version

* Add changelog file

* Change address title from h3 to h2 on edit address page

* Bump up form-edit-address template version

* Update form-edit-address.php

* Update my-address.php

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-08-05 14:51:23 +01:00
DAnn2012 8f661d071f
Fix typos (shopper.js) (#50337) 2024-08-05 15:13:36 +03:00
github-actions[bot] a757c53e8b
Delete changelog files based on PR 50126 (#50357)
Delete changelog files for 50126

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-05 12:51:02 +01:00
Fernando Marichal 54b29ec50e
[E2E tests]: Add product description using the block editor (#50232)
* Add product description

* Add changelog

* Add changelog

* Always use same label for ToolbarItem
2024-08-05 08:43:22 -03:00
Vladimir Reznichenko 559c91626c
CI: minor speed boost for Check Asset Sizes and Build Project Jobs. (#50342) 2024-08-05 12:58:39 +02:00
Luigi Teschio 854c81d9ad
Compatibility Layer: fix documentation (#50348)
* Compatibility Layer: fix documentation

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Update plugins/woocommerce-blocks/docs/internal-developers/blockified-templates/compatibility-layer.md

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-08-05 09:59:25 +00:00
DAnn2012 6c22840dcf
Fix typos (Produts) (#50334)
* Update config.js

* Update data.json

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-05 05:54:52 +00:00
Marianne380 0ca152fa0d
[Enhancement] Create new filter `woocommerce_is_store_page` for filtering if the URL is a store page. (#50174)
Create a new filter woocommerce_is_store_page for filtering if the URL is a store page.

Fixes #50173

* Create new filter  for filtering if the URL is a store page

* Fix brace

* Update plugins/woocommerce/src/Admin/WCAdminHelper.php

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>

* Add changefile(s) from automation for the following project(s): woocommerce

* Remove extra whitespace

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:10:57 -07:00
piinthecloud d92161cbd1
Move checkout docs to main v2 (#49984)
* move checkout docs with front matter to main folder (#49186)

* move checkout docs with front matter to main folder

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>

* initial commit to reapply changes from PR #49186

* update html tags to unicode and clean up hashlinks

* revert unicode

* remove emoji

* update manifest

* test readme page

* remove avail-filters since it is now redundant with the readme

* update links

* test htmlentity

* pdate links

* typo fix

* update readme with actual doc

* fix links

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-08-02 20:12:06 +02:00
Alba Rincón f8854e0a4f
CYS - Improve the error when a request fails due to permissions (#50211)
* Improve the error when a request fails due to permissions

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix regression and copy

* Fix feedback: improve types

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:50:13 +02:00
Luigi Teschio 5e78db0585
CYS: Improve tracking survey (#50196)
* CYS: Improve tracking survey

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:38:25 +02:00
Ames Plant dbc3056845
[WIP][Accessibility] Add field for the email footer text color (#49648)
Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 16:14:21 +01:00
Maikel Perez 67ab34aab2
Product image getting removed in the new product editor after replacing cover image (#50181)
* Fix image gallery state conflict with external consumer state

* Fix the image gallery removal conflict now that the image gallery is stateless

* Add changelog files

* Ignore the media if it is replaced by itseft
2024-08-02 09:29:28 -03:00
Adrian Moldovan 8849f54491
[e2e tests] Implement the flaky test reporter for core e2e tests (#50259) 2024-08-02 13:32:41 +02:00
Fernando Marichal 14751afeac
Use the validatorId to get access to the field instead of the context (#50035)
* Remove context

* Add method to get closest block

* Make methods async

* Add changelog

* Add await to getProductErrorMessageAndProps

* Fix getClientIdByField

* Fix tests

* Undo send id to DateTimePickerControl

* Add check before calling getClientIdByField
2024-08-02 08:31:18 -03:00
DAnn2012 66daa66aa3
Fix typo (filter-setter.php) (#50157)
* Update filter-setter.php

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2024-08-02 11:24:48 +01:00
Vladimir Reznichenko 1440d26bf0
Monorepo: update post-merge hook - make instalaltion conditional. (#50254)
If the merged changes are unrelated to dependency management and Composer/PNPM manifests, do not refresh dependencies.
2024-08-02 11:08:54 +02:00
Luigi Teschio 83b12d59ee
CYS: add E2E tests for fonts installation (#50210)
* CYS: add E2E tests for fonts installation

* remove check

* Add changefile(s) from automation for the following project(s): woocommerce

* remove console.log

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 08:43:35 +00:00
Adrian Moldovan 4e2c72ec23
[e2e tests] Remove Github reporter (#50256) 2024-08-02 11:38:24 +03:00
RJ c4beb062bf
fix: fixed react18 React.render deprecation notice for WCAdmin (#48785) 2024-08-02 06:53:49 +00:00
louwie17 89e8df826a
Update linked product search to use GB combobox in order to fix timing issue (#50128)
* Make use of GB Combobox for the product select

* Update E2E tests

* Add changelog

* Small CSS changes

* Fix create variable product E2E test

* Add changelogs

* Use our internal wrapper of the combobox

* A couple small fixes

* Fix bug and address feedback

* Address small formatting in comments

* Move search products back to consolidated function
2024-08-02 03:24:14 -03:00
DAnn2012 1759672206
Fixed typos in CSS classes (#50243)
* Update index.scss

* Update index.js

* Update style.scss

* Update task-list.tsx

* Update task-list-placeholder.tsx

* Update setup-task-list.tsx

* Update task-list-completed-header.scss

* Update task-lists.scss

* Update task-list-completed-header.tsx

* Update page-loads.spec.js

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 05:15:13 +00:00
Ames Plant 2eff30de04
[Accessibility] Add a label to the product pagination for the woocommerce pagination (#49924)
* Add a label to the product pagination for the woocommerce pagination

* Bump template version

---------

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
2024-08-02 10:22:23 +07:00
DAnn2012 ef85173041
Fixed typo WooCommmerce (#50247)
* Update README.md.mustache

* Update README.md

* Update page-controller.md

* Update README.md

* Add changefile(s) from automation for the following project(s): @woocommerce/create-woo-extension, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-08-02 03:14:15 +00:00
Chi-Hsuan Huang e8dacef7a6
Track frequency of unhandled JS errors with MC Stats (#50155)
* Add bumpStat and fix tests

* Add changelog

* chore: Update dependencies and add @woocommerce/tracks for remote logging

* feat: Track frequency of unhandled JS errors with bumpStat

* chore: Update error boundary to log unhandled JS errors with bumpStat

* Add changelog

* Fix lint

* Check if tracks is enabled before bumping stats

* Fix test

* Fix lint

* chore: Refactor buildQuerystring to buildQueryParams for clarity and consistency

* Add bumpStat to wc tracks mock
2024-08-02 03:04:31 +00:00
Chi-Hsuan Huang ed81aa8201
Integrate JS remote logging package in WooCommerce Admin (#50134)
* Update remote logger to check dev env and whether logging is enabled

* Add changelog

* Integrate JS remote logging package in WooCommerce Admin

* Add changelog

* Update remote logger package

* Update test

* Log error in error boundary

* Update remote logger

* Fix webpack config

* Update log stack format

* Update handleError

* Add init debug
2024-08-02 10:25:39 +08:00
Vladimir Reznichenko a3f4d722b9
CI: speedup 'Check Asset Sizes' job (take 3) (#50178)
* CI: attempt 3 to speedup 'Check Asset Sizes' job.

* CI: cleanup

* CI: changelog entry.
2024-08-01 14:15:10 -07:00
Gabriel Manussakis fa3d8233da
[Accessibility] Keep focus on shipping option input once selected (#49360)
* Keep focus on shipping option input once selected

* Add changelog file

* Remove unnecessary space

* Manage focus of the shipping methods inputs on checkout

* Refactor the code to use native JS instead of jQuery

* Revert native JS usage on jQuery code

* Focus shipping input after re-initing payment methods on checkout

* Replace includes with indexOf for consistency

* Revert usage of native JS

* Remove unnecessary if statement

* Check if event exists before assigning current target

* Get current target with native JS

* Remove unnecessary spaces
2024-08-02 03:14:18 +07:00
Andrej Mernik f20afed89c
Optimize maybe_assign_default_product_cat to drop caches only if changes were made (#50006)
* Optimize maybe_assign_default_product_cat

maybe_assign_default_product_cat should flush cache, delete transients and update term counts only if changes were made

* Fix whitespace

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-08-01 12:58:16 -07:00
github-actions[bot] 38d2d82e2d
Delete changelog files based on PR 50236 (#50238)
Delete changelog files for 50236

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-01 11:40:07 -07:00
Jorge A. Torres 4d1e61a8ce
Prevent creation of password-protected coupons (#50236)
* Warn when creating password-protected coupons

* Add changelog
2024-08-01 11:31:38 -07:00
Corey McKrill 864d7b52e8
Logging: Add parameter to avoid log directory creation (#49766)
* Logging: Add parameter to avoid log directory creation

The `get_log_directory` method, by default, attempts to create the
directory if it doesn't exist yet. However, the method is called early
in the initialization of the WooCommerce plugin, regardless of whether
the logging system is configured to use the filesystem. This adds a
parameter to `get_log_directory` to specify whether to attempt directory
creation, and ensures that the parameter is set to false in a couple
of specific places.

* Remove usage of method from old log file handler

* Don't initialize log directory when getting size

* Add missing translator note

* Rename  param to

* Reduce usage of wp_upload_dir
2024-08-01 11:21:53 -07:00
Ames Plant 806f2efdc6
[Accessibility] Update product order status colors to ensure accessible color contrasts (#49934)
Update product order status colors to ensure accessible color contrasts

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
2024-08-01 18:19:59 +01:00
Thilina Pituwala 03fa96d7f3
Fix subscription activations when user own multiple subscriptions of same product install on different stores (#49803)
* When matching subscriptions to installed products, giving priority to subscriptions available for activation.

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-01 19:04:55 +02:00
Fernando Marichal 03bbc139de
Enable skipped E2E tests for attributes (#50143)
* Enable test to add existing attributes

* Enable test to update product attribute

* Add changelog

* Locate item by aria-label instead of label

* Add blur to the summary field
2024-08-01 13:45:11 -03:00
Nathan Silveira 6a9278d7c2
Strip HTML tags from aria-label in wc_help_tip function (#50103)
* Strip HTML tags from aria-label in wc_help_tip function

* Run same escape sequence for aria_label string

* Refactor wc_help_tip and add additional test case

* Remove blank line
2024-08-01 12:35:41 -03:00
Thomas Roberts e2bd308e8e
Prevent Store API orders being placed with empty/invalid fields (#50028)
* Fix spacing/capitalisation on comments.

* Use get_fields_for_location to prevent numeric keys going into locale

* Merge default locale with current locale

Required because the current locale only contains a diff against the default

* Iterate over current locale to get validate required fields

* Add unit tests to cover the state/postcode checks

* Add changelog

* Fix lint errors

* Ensure locale filter runs when tests need it.

* Update tests to reset locale after running

* Add validate_required_additional_fields function

* Add test to ensure required additional fields are passed

* Add throws tag to docblock
2024-08-01 15:58:06 +02:00
Mike Jolley 02c639c2a3
Store API: Remove the need for nonces when using cart tokens. Remove deprecated `X-WC-Store-API-Nonce` header. (#50025)
* Tweak token validation to handle empty nonce

* Disable nonce check if you have a valid token

* Docs for Cart-Token

* Remove deprecated X-WC-Store-API-Nonce (was due to be removed blocks 7.5)

* Token should default to empty string

* Changelog
2024-08-01 15:52:54 +02:00
louwie17 97b3b10a2b
Add product form extensibility tutorials (#50137)
* Start on the generic fields tutorial

* Add custom field tutorial

* Some small updates

* Address linting

* Minor updates

* Update manifest

* Address PR feedback, mostly formatting changes
2024-08-01 10:50:51 -03:00
Matt Sherman 606224d0d0
Product Editor: Fix shipping dimensions length field label (#50180)
Correct label of length field
2024-08-01 08:49:07 -04:00
Vladimir Reznichenko 8da5a91842
CI: speedup 'Build Project Jobs' (#50197)
In this PR, we use shallow checkout if the environment provides no base_ref, which is needed for identifying changed files. If no ref provided, we are not able to calculate the diff and therefore go with faster shallow copy.
2024-08-01 14:18:08 +02:00
Michal Iwanow a15235d230
Update My Subscriptions screen labels and columns (#49985)
* Remove Marketplace feedback modal which is no longer used

The goal of the modal was not to be shown after 2023 (see https://github.com/woocommerce/woocommerce/pull/39609),
so we can remove it from the codebase now. Especially that it's a bit buggy - snackbar prompting for feedback
is displayed but the modal is not there because of the check for FEEDBACK_DIALOG_CAN_APPEAR.

* Marketplace Subscriptions - rename columns

* Marketplace subscriptions - show status badge in the Subscription column

Additionally, we remove the info icon from the status popover

* Marketplace subscriptions - add button helping to turn renewals on

* changelog

* Add focus handlers for accessibility

* Remove unused variable

* Fix sharing path url - My Subscriptions

* Change the status badge priority for expired

We should show the expired badge first, as it makes more sense with the
primary action.

---------

Co-authored-by: raicem <cem.unalan@automattic.com>
Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
2024-08-01 14:12:32 +02:00
Adrian Moldovan 0ba308247a
[testing workflows] Add pre-release checks (#50204) 2024-08-01 13:48:58 +02:00
Manish Menaria a73c6e5546
Product Collection: Enable Context-Aware Previews by Adding `usesReference` to `registerProductCollection` (#49796)
* Allow registering custom collections with various context references

Implemented the registration of product collections with different context references using the `usesReference` property. These custom collections are now registered with specific contexts such as product, cart, order, and archive.

This enhancement allows for more tailored previews and functionality based on the specific context in which the product collection is used.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Support multiple references for usesReference

* docs: update documentation to include `usesReference`

Enhanced the `register-product-collection` documentation to include details about the new `usesReference` property. This property allows collections to specify required references, enhancing their contextual relevance and preview capabilities.

- Added `usesReference` description to the collection fields section.
- Included examples demonstrating the usage of `usesReference` with single and multiple references.
- Clarified the behavior when required references are unavailable on the editor side but available on the frontend.

This documentation update provides third-party developers with the necessary information to utilize the `usesReference` property effectively in their custom product collections.

* test: add e2e tests for `usesReference`

Added end-to-end tests to verify the functionality of the `usesReference` property in product collections. These tests ensure that the appropriate preview labels are displayed.

- Created multiple custom product collections with different `usesReference` values: `product`, `cart`, `order`, `archive`, and combinations of these.
- Verified that collections show the correct preview label when the required reference is present.
- Ensured that the preview label is not shown in irrelevant contexts, such as posts or product catalog templates.

This addition enhances test coverage and ensures the robustness of the `usesReference` feature.

* Fixed issue with preview label showing in Specific Product and Archive templates.

* Handle cases when termId or productId is 0

This also improves the readability of the code by using better variable names.

* Make PC use postId context so location can be recognised correctly (#50152)

* Fix TS errors

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-01 15:33:27 +05:30
Bart Kalisz 63e212f9ce
Blocks: Update wp-env config to use production WP (#49704) 2024-08-01 11:59:42 +02:00
DAnn2012 e65e8bf83a
Made two strings translatable in slotfill.js (#50198)
* Update slotfill.js

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-08-01 09:13:18 +00:00
Alba Rincón 69ce0c6e3a
CYS - Document possible Intro pages (#50171)
* CYS - Document possible Intro pages

* Update README.md

* Add changefile(s) from automation for the following project(s): woocommerce

* Fix lint errors

* Move images to the repo

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-01 10:33:03 +02:00
Akeda Bagus cf6268ec55
Use UTM parameters to link Tracks events: CTA from connect notice and successful site connection (#50126)
Pass UTM parameters to get events from clicking "connect" notice to site being connected
2024-08-01 14:01:21 +07:00
Ilyas Foo bb8090a165
Improvements to core profiler checkbox UX (#50151)
* Fix border and vertical align

* Changelog

* Add toggle event to plugin card

* Add test

* Fix double invocation and simplified onChange

* Fix unintended optional parameter change
2024-08-01 13:26:05 +08:00
Chi-Hsuan Huang e29d14b12e
Implement server-side remote error logging (#49599)
* Implement php remote logging

* Log fatal errors remotly

* Add tests

* Add changelog

* Improve code doc and type check

* Bug fixs

Fix Undefined variable $local_logger

* Rebase

* Fix tests

Fix tests

* Fix import path

* Use WC_Site_Tracking::is_tracking_enabled()

* Simplfy path checking/replace logic

* Rename log method -> handle

* Handle wp_safe_remote_post fails

* Fix lint

* Update plugins/woocommerce/includes/class-woocommerce.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Use WC_Rate_Limiter

* Update wc_doing_it_wrong log method name

* Update is_third_party_error method signature in RemoteLogger.php

* Revert changes

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* chore: Add 'php' tag to RemoteLogger in woocommerce

* Fix test

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-08-01 04:56:14 +00:00