Commit Graph

50293 Commits

Author SHA1 Message Date
barryhughes c41eccc58e Check a valid product object was obtained before calling its methods. 2023-01-17 15:40:52 -08:00
Barry Hughes ebae81ccaf
Small edit to the tooltip text (#35107) 2023-01-17 15:16:30 -08:00
Barry Hughes 8495c5f779
fixing typo in name of country in states(i18n) file (#36457) 2023-01-17 15:15:49 -08:00
barryhughes 4bb137637f Update API tests re revised email image header tooltip text. 2023-01-17 13:59:36 -08:00
barryhughes 1fb60677fc Changelog. 2023-01-17 13:47:32 -08:00
Barry Hughes 2bf9f57795
Restore pre-7.2.0 quantity selector behavior (#36460)
Prior to 7.2.0 the quantity input was hidden if input min and max were identical (either because the product was sold individually, or because of min/max products config). This change restores that behavior, but makes it possible to render the input in readonly mode if desired (via filters).
2023-01-17 17:06:25 +01:00
Matthias Kittsteiner 0f78e32216
Add context to countries shipping to prefix (#36254)
Closes https://github.com/woocommerce/woocommerce/issues/36242
2023-01-17 10:39:10 +01:00
Joel Thiessen d9daad3e9c
Converting product details section to utilize slot fills (#36368)
* Working prototype of product details via slotfill

* Raising default order for product slot-fills

* Move logic to details field name component

* Adding order prop to all fills.

* Adding components changelog

* Adding changelog

* Deleting obsolete product details section files

* Reducing spacing between slot filled fields
2023-01-17 05:04:58 -04:00
Joshua T Flowers ea64a98f54
Extract attribute filtering and fetching logic out of attribute components (#36354)
* Move attribution fetching to separate hook

* Add changelog entry

* Set all attributes on update of subset of attributes

* Move filtering logic to hook

* Remove tests that filter attribute by type inside the component

* Rename AttributeField to AttributeControl and props from attributes to value
2023-01-17 04:34:08 -04:00
Willington Vega 6377314b1b
Remove deprecated usage of `${var}` syntax in strings (#36439)
* issue-35763/fix-php-8.2-deprecation-warnings

* Declare $mockable_functions property

* Declare $mockable_classes property

* Fix deprecated usage of ${var} in strings

* Add changelog file

* Avoid using interpolation to create SQL statement

We could ignore the PHPCS error. However, ignoring the error leaves
PHPCS unable to detect future changes that may introduce unsafe
interpolation.

I think the more verbose approach is the safest approach in this
case.

* Ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared

There doesn't seem to be a way to use a variable name for the name of the table without
triggering a PHPCS error.

* Avoid interpolated passing interpolated variables to __()

* End inline comments with a full-stop
2023-01-17 10:47:00 +08:00
Barry Hughes f4af1b7a84
Get the first array item for the alt_text. (#35009) 2023-01-16 16:28:32 -08:00
louwie17 8fc9c5cc09
Add basic fields for rendering of Product MVP (#36392) 2023-01-16 12:50:30 -08:00
Priyanka Behera 3719b62dad
Fixed - woocommerce_order_tracking shortcode causes fatal error if a refund ID is entered #31760 issue (#33735)
* Fixed #31760 issue

* additional space removal after &&

* Make sure tracking shortcode only tracks orders of type `WC_Order`

* Add changelog

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-01-16 16:31:48 -03:00
Mahdi Taleghani 497119b622
fixing a typo in i18n states file 2023-01-16 21:23:55 +03:30
Joshua T Flowers 0d6af37a66
Add requesting state, actions, and selectors to CRUD data stores (#36297)
* Add requesting state, actions, and selectors to CRUD data stores

* Allow resource specific selectors for requesting status

* Use constants for action names in reducer

* Add tests around new utils

* Add changelog entry

* Use getResourceName instead of getRequestKey in reducer

* Rename and use getRequestIdentifier to avoid ambiguity with resource names

* Sanitize and replace ID query with key in resolution selectors

* Fix up crud action names and remove camel casing

* Fix missing ID in ID query check

* Fix up tests around request identifier

* Add additional tests around utils

* Clean up imports

* Add missing selectors to tests
2023-01-16 07:54:33 -08:00
Vedanshu Jain d58a6035a6
Include WC Cart functions for REST API calls (#36182) 2023-01-16 20:00:18 +05:30
Roy Ho d935b0137a
Add necessary permissions for code freeze workflows (#36399)
* Add necessary permissions for code freeze workflows

* Checkout pnpm-lock.yaml to prevent issues
2023-01-16 06:12:25 -08:00
Joel Thiessen 2dce575449
Adding ProductForm data store (#36430)
* Removing overriding functions in Section.php

* Adding changelog

* Adding product form data store

* Adding data package changelog
2023-01-16 08:13:55 -04:00
Vedanshu Jain b1489ca796
Properly handle product filtering query vars when front page is ‘shop’ (#36224) 2023-01-16 17:00:25 +05:30
Néstor Soriano 443b563335
Upgrade PHPUnit to v8 and stop using patched PHPUnit 7 for PHP 8 (#36273)
* Upgrade PHPUnit to v8, and remove usage of PHPUnit7 fork in CI

Once the minimum WordPress version supported by WooCommerce is 5.9
and the minimum PHP version supported is 7.2, we can switch to
PHPUnit 7 and the patched PHPUnit 7 with support for PHP 8 is
no longer needed.

* Resolve PHPUnit 8 deprecations in tests

* Add changelog file

* Fix code formatting
2023-01-16 20:58:09 +13:00
Sam Seay 235709ebf7
Enable Live Branches feature in WooCommerce Beta Tester (#36407) 2023-01-16 18:31:08 +13:00
github-actions[bot] 30b00e3d91
Update changelog.txt from release 7.3.0 (#36409)
Prep trunk post release 7.3.0

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-01-16 17:21:52 +13:00
Fernando Marichal c5a27cbd55
Add advanced setting option (#36380)
* Modify feature flag

* Add tooltip to WC > Settings > Advanced > Features

* Add Settings option

* Add `optional_features` and `beta_features` option

* Add changelog

* Fix lint

* Fix lint

* Add `new_product_management` to legacy features

* Fix escaped tooltip

* Fix `Analytics pages` e2e tests

* Fix `Payment setup task` e2e tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-13 17:04:02 -03:00
Barry Hughes 8ad92c4c82
Order emails: improve responsiveness and RTL support (#36310)
* Tweak email layout/styling. This should improve responsive properties for RTL emails particularly.

* Further improve layout consistency across a range of mobile email clients.

* Update existing code to match current coding standards.

* Further PHPCS fix.

* Update sample email to match recent changes in our default email CSS.
2023-01-13 16:48:27 -03:00
Barry Hughes f84042a823
[HPOS] Add support for ordering by metadata in order queries (#36403) 2023-01-13 10:20:49 -08:00
Barry Hughes 5d10f08e28
Widen the selector used to hide the quantity input (#36384) 2023-01-13 09:19:04 -08:00
nigeljamesstevenson 1eed9a4fc9
update k6 readme variable names (#36398) 2023-01-13 16:40:42 +00:00
Matt Sherman 69e7fd1b42
Analytics: Decode HTML entities in CategoryBreadcrumbs (#36321)
* Decode HTML entities in CategoryBreadcrumbs

* Changelog
2023-01-13 11:14:40 -05:00
Moon c3d62f113a
Migrate product image component to TS (#36305)
* Convert product-image to ts

* Add changelog

* Remove unused ts-expect-error

* Allow arbitrary properties for product

* Remove propTypes

* Update packages/js/components/src/product-image/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/product-image/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/product-image/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/product-image/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Remove unused import

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 19:19:01 -08:00
barryhughes dc2a0ff774 Changelog. 2023-01-12 16:26:54 -08:00
Paul Sealock 1772babf91
Security update 242 (#36408)
* Customers REST API: return user metadata only when requester has an administrator role

* Add changelog file

Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2023-01-13 13:14:42 +13:00
Sam Seay 0f4bf6c8f4
Bump stable tag and update changelog for 7.2.3 release. (#36385) 2023-01-13 13:11:54 +13:00
Moon 4ff99a8555
Migrate Section component to TS (#36298)
* Convert to ts

* Add changelog

* Fix style

* Remove propTypes

* Remove unused import

* Only allow false

* Update packages/js/components/src/section/section.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/section/section.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/section/section.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 13:57:15 -08:00
Jorge A. Torres 65bf167a4d Make PHPCS happy xD 2023-01-12 18:26:16 -03:00
Jorge A. Torres 0ce815d464 Add changelog 2023-01-12 18:02:12 -03:00
Jorge A. Torres fd7099824e Add unit tests 2023-01-12 18:02:07 -03:00
Jorge A. Torres e4efa941e9 Implement sorting order queries by metadata 2023-01-12 18:02:02 -03:00
Jorge A. Torres 22edb1f67f Build a list of flat meta_query clauses when processing meta queries 2023-01-12 18:01:29 -03:00
Jorge A. Torres f1b49e76e5 Fix PHPCS issue 2023-01-12 18:01:03 -03:00
louwie17 04d371b7e0
Add product form api functions (#36165)
Co-authored-by: Joel <dygerati@gmail.com>
2023-01-12 12:33:06 -08:00
Fernando Marichal 78002eac9c
Hide `Variations` section when it is empty (#36202)
* Add changelog

* Hide Variations section when it is empty

* Fix hiding variations

* Remove `totalCount const

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-12 16:32:40 -03:00
Joshua T Flowers 891ecb7efb
Redirect to new product experience when in experiment group (#36381)
* Redirect to new product experience when in experiment group

* Add changelog entry
2023-01-12 16:02:40 -03:00
Joshua T Flowers ad59769f25
Remove persisted query on return to parent product from variation (#36365)
* Remove persisted query on return to parent product from variation

* Add changelog entry
2023-01-12 09:20:46 -08:00
Matt Sherman 54c0acf8cd
Decode HTML entities in CategoryFieldItem (#36367)
* Decode HTML entities in CategoryFieldItem.

* Changelog
2023-01-12 10:21:43 -05:00
louwie17 11af1e6381
Add/36019 php product form helper classes (#36093)
* Add initial PHP classes for field registry with tests

* Add README

* Add changelog

* Add sorting to get fields and add test for this

* Update location to section

* Fix lint errors

* Address PR feedback and add Card and Section classes

* Fix php unit test

* Some more cleanup and consolidation of product form component logic

* Fix tests and linting

* Rename Card to Subsection and move some logic around

* Rename Form to FormFactory

* Fix lint errors
2023-01-12 04:39:38 -04:00
louwie17 b8c25b49bf
Initial product form field store (#36362)
* Add initial product fields registry store and helper functions

* Add changelog

* Change edit to render and address PR feedback

* Make use of memoize-one instead of rememo as memoize-one is already installed
2023-01-12 04:02:35 -04:00
Matt Harrison e588c560bf
Update spelling of Cancelled to Canceled for US English. (#36294)
* Update spelling of Cancelled to Canceled for US English.

This only updates output display text that uses US English. All code that uses
the form Cancelled is unchanged and is perfectly fine to stay as Cancelled.
(since it is behind the scenes and would require changes in other plugins)

For languages where Cancelled is preferred such as UK English the approprate
form can be applied in the translation files.

Fixes https://github.com/woocommerce/woocommerce/issues/25847

* add changelog file

* Update plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 12:13:36 +08:00
Sam Seay 11b46d4f77
Add a new set of CLI commands to WooCommerce Beta Tester (#36339) 2023-01-12 14:16:01 +13:00
Sam Seay 262b2ecebd
Don't run CI checks on PRs that are just changelog changes (#36280) 2023-01-12 14:09:36 +13:00
barryhughes 83c946602a Widen the selector used to hide the quantity input (for products that are sold individually). 2023-01-11 15:25:12 -08:00