Commit Graph

8817 Commits

Author SHA1 Message Date
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
Vedanshu Jain d58a6035a6
Include WC Cart functions for REST API calls (#36182) 2023-01-16 20:00:18 +05:30
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
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
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
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
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
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
Joel Thiessen 6e428201c1
Adding WooProductSectionItem slotfill (#36331) 2023-01-11 10:00:20 -08:00
nigeljamesstevenson 0490311829
k6: update order requests for HPOS add tidy scenarios (#36174) 2023-01-11 16:08:08 +00:00
Maikel David Pérez Gómez 8bada412d4
Product variations should inherit parent product properties (#36234)
Remove manage_stock 'parent' value before saving the variation
2023-01-11 11:41:25 -03:00
Vedanshu Jain b3bd207baa Enable COT Tests for all PRs. 2023-01-11 09:31:11 +05:30
github-actions[bot] 4ab70c5e7d
Delete changelog files based on PR 36170 (#36172)
Delete changelog files for 36170

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-01-11 07:19:51 +13:00
Joel Thiessen f429b9444c
Adding WooProductFieldItem slotfill (#36315) 2023-01-10 10:13:02 -08:00
Rodrigo Primo 1d234b5ac0
Update TaskLists::add_task() to reflect changes in TaskList::add_task() (#36104)
* Update TaskLists::add_task() to reflect changes in TaskList::add_task()

In
8ff08ea0c9 (diff-061f664bd417ad78d47c53ad5e6cc7e2eb1243af4e55b6fbf68750225acb06a3R173)
`TaskList::add_task()` was refactored to receive an instance of `Task`
instead of an `array` as its first parameter.

This commit updates `TaskLists::add_task()` (easy to miss that it is a
different method as the only difference is the plural in the class
name) to reflect the changes from the commit mentioned above. It
updates the type of the second parameter from `array` to `Task` and
renames the parameter from `$args` to `$task`.

I found this while using `TaskLists::add_task()` to add a MailPoet task
as our PHPStan checks complained that I was passing the wrong parameter
to this WooCommerce method.

* Add missing changelog file
2023-01-10 08:13:49 -08:00
Barry Hughes 301182fc8a
When product is sold individually, hide quantity selector (#36350) 2023-01-10 09:49:59 +01:00
barryhughes a1ce90b306 Changelog. 2023-01-09 10:05:26 -08:00
Joris Van Steenberghe 0774e0506a Make sure setting sort order of all variations takes private variations into account (#32833) 2023-01-09 13:48:36 +01:00
Barry Hughes 0f37590021
Validate Norweigan postcodes/rework code for 4-digit post code validation (#36277)
Also gather countries that use four digit postcodes in one single case in the `switch` statement.

Co-authored-by: Stian <stian@dekode.no>
2023-01-09 12:11:22 +01:00
Vedanshu Jain 01e8a2029a
Make HPOS UX more consistent with posts (so that same e2e tests passes). (#36282) 2023-01-09 12:08:06 +01:00
Alexandre Faustino af9389d50d
Adds 2 new order status filters for bacs and cheque email instructions (#35849)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2023-01-09 11:52:41 +01:00
Néstor Soriano b03cb80c0c
Fix: order refunds REST API endpoint reading from posts table even with HPOS active (#36308)
Move HPOS-aware orders retrieval code from REST API v3 to v2. 

This has two effects:

1. Make the /orders endpoint compatible with REST API v2 when HPOS
   is active, additionally to v3 (v1 would require additional work).

2. Fix the /orders/<id>/refunds endpoints for v2 and v3, which was
   retrieving data from the posts table even when HPOS active

The class hierarchy is: RefundsV3 extends RefundsV2 extends OrdersV2
and OrdersV3 extends OrdersV2.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2023-01-09 10:59:22 +01:00
Lucio Giannotta 74768f4c56
Update WooCommerce Blocks to 9.1.4 (#36314)
This update removes compatibility of the “Products (Beta)” block from
WordPress versions below 6.1.
2023-01-09 08:02:17 +13:00
Maikel David Pérez Gómez 1ab678c13f
Include tax options in pricing section (#36299)
* Add Charge sales tax on sub section to pricing section when enable taxes is set to yes

* Add tax classes datastore

* Load tax classes in pricing section

* Set empty value when tax class is standard rate

* Add changelog files

* Add custom resolver to use slug as id for tax classes

* Add helper text and learn more link to tax class radio group
2023-01-06 09:41:45 -03:00
Fernando Marichal 230e79fbdf
Fix reordering items logic in attributes/options lists (#36296)
* Fix reordering list items bug

* Add tests

* Remove orphan comment

* Add changelog

* Rename const

* Update plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Rename `objectKey` to `attributeKey`

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2023-01-06 08:53:03 -03:00
Joshua T Flowers 8b905b92c0
Allow product tab navigation without prompting for unsaved changes (#36235)
* Add callback to confirm whether or not the prevent leaving page prompt should trigger

* Move prevent leaving logic to util and add tests

* Add changelog entry

* Add navigation changelog entry

* Fix WooCommerce data mock

* Revert desctructuring of nav properties
2023-01-05 18:30:36 -08:00
Joshua T Flowers 04089f37e6
Add product variation flag to hide WIP (#36311)
* Add product variations feature flag

* Add changelog entry
2023-01-05 18:30:23 -08:00
Vedanshu Jain 4c236bdc37
Use more generic selectors for HPOS<>Posts compatibility (#36284)
* Use more generic search selector for edit screen.

* Use more generic heading text for post<>HPOS compat.
2023-01-05 10:26:08 -08:00
Vedanshu Jain 677896c304
Add support for sorting by includes param. (#36215) 2023-01-05 22:17:14 +05:30