Commit Graph

47180 Commits

Author SHA1 Message Date
Nestor Soriano fbc77160db
Use CssInliner class instead of Emogrifier class
With the upgrade of the Emogrifier package we can't use the Emogrifier
class, since it was removed in v4 (we need to use at least v5 for
compatibility with PHP 8); so we now use the CssInliner class.

Note that this is a potential breaking change for consumers of the
woocommerce_emogrifier hook, which was getting an Emogrifier object
as parameter (now it gets a CssInliner object, which is partially
compatible).
2022-03-24 14:08:18 +01:00
Nestor Soriano 0f2b717462
Fix calls to deprecated PHPUnit methods in unit tests.
Fix tests where PHPUnit 8 would throw "this method is deprecated
and will be removed in PHPUnit 9, use this other one instead"
warnings, by replacing all those with the proper ones. This will help
once we are able to use PHP 8 (once WP requirement is bumped to 5.9)
2022-03-24 14:08:18 +01:00
Nestor Soriano 5837a53821
Add .phpunit.result.cache to .gitignore
This file is created by PHPUnit v8 when tests run.
2022-03-24 14:08:18 +01:00
Nestor Soriano 01073ec24f
Add return type setUp and tearDown methods in unit tests
After the bump to PHP 7.2 all the setUp and tearDown methods
in unit test classes need to have an explicit "void" return type
declaration.
2022-03-24 14:08:17 +01:00
Nestor Soriano 819494f2ed
Bump WooCommerce minimum required PHP version to 7.2
This includes:

- Changing "Requires PHP" in woocommerce.php
- Changing "require-php" and "config-platform-php" in composer.json
- Bumping pelago/emogrifier to ^6.0 in composer.json
- Bumping maxmind-db/reader to ^1.6 in composer.json
- Bumping composer/installers to ^1.9 in composer.json
  (bump to 2.0 not possible due to conflict with Admin package)
- Removing jobs for 7.0/.1 unit test runs in CI
- Explicitly specifying the PHPUnit version to be 7.5,
  otherwise it will install v8 which isn't compatible with
  WordPress <5.9
2022-03-24 14:08:11 +01:00
Peter Fabian 8cd3a86aaa
Merge pull request #31539 from nagpai/fix/30209
Fix columns in checkout page for TwentyTwenty theme
2022-03-24 10:57:22 +01:00
rodelgc 15fbc0be9a
Removed faker dependency (#32069)
* Removed faker dependency
2022-03-24 15:30:40 +08:00
louwie17 eb081aa9fa
Merge pull request #32320 from woocommerce/add/32161_reminder_bar
Add reminder bar for task list experiment
2022-03-23 17:12:05 -03:00
Lourens Schep 44d9824d47 Fix error when tasks are not defined yet 2022-03-23 14:05:25 -03:00
Lourens Schep 371ce71173 Update completed tasks variable 2022-03-23 13:57:48 -03:00
Josh Betz 8446625b0d
Merge pull request #32073 from woocommerce/reviews-api/add-product-info
Added product name + permalink to the GET Reviews API endpoint response
2022-03-23 11:06:22 -05:00
anitaamurthy 7603a2c02b Fixed spacing issue 2022-03-23 17:11:09 +05:30
Chi-Hsuan Huang e3d035a624
Merge pull request #32291 from woocommerce/add/32138-ability-for-code-based-notes-to-update
Add ability for code-based notes to update
2022-03-23 17:08:15 +08:00
RJ 04d94d0430
Merge pull request #32327 from woocommerce/dev/publish-wca-packages
Corrected path for publishing commands
2022-03-23 16:07:19 +08:00
rjchow 2d8214af2e Corrected path for publishing commands
- typo in the path in previous commit
2022-03-23 13:30:11 +08:00
Chi-Hsuan Huang 9d7879b254
Merge pull request #32290 from woocommerce/add/primary-arg-back-to-add-action
Add `$primary` param back to add_action method
2022-03-23 11:22:52 +08:00
RJ fc163b6dc9
Merge pull request #32313 from woocommerce/dev/publish-wca-packages
Bump WCA JS packages version numbers in package.json and changelogs
2022-03-23 11:18:04 +08:00
Lourens Schep fdbc2190c0 Update changelog 2022-03-22 12:32:32 -03:00
Lourens Schep 25d6b6d528 Add reminder bar for task list experiment 2022-03-22 12:28:58 -03:00
louwie17 b27618e51d
Merge pull request #32304 from woocommerce/fix/add_feature_config_to_gitignore
Remove feature config from repo and add it to the gitignore
2022-03-22 08:56:38 -03:00
Chi-Hsuan Huang c9e9465802 Update indent 2022-03-22 16:13:22 +08:00
Chi-Hsuan Huang b7cee3e867 Add tests for update_note_field_if_changed method 2022-03-22 16:09:01 +08:00
rjchow 43f81cbf69 Bumped WCA JS package version numbers 2022-03-22 16:08:24 +08:00
rjchow 3c0cc02104 Updated WCA package publishing commands
- Updated path for packages
2022-03-22 16:07:36 +08:00
Chi-Hsuan Huang 5b294e4c11 Use in_array to check need_save logic 2022-03-22 15:29:30 +08:00
Chi-Hsuan Huang da241f6c70
Merge pull request #32293 from woocommerce/fix/admin-js-tests
Fix WooCommerce Admin JS unit tests
2022-03-22 14:11:08 +08:00
Chi-Hsuan Huang 1fcdc5b6a2 Update wc admin test command 2022-03-22 11:24:59 +08:00
Chi-Hsuan Huang 0530ee122c Fix explat assignment-test.js for node >= 16 2022-03-22 11:24:59 +08:00
Chi-Hsuan Huang 3dc5f95254 Update test mocks
Fix lint
2022-03-22 11:24:58 +08:00
Lourens Schep 268a3e9e61 Add feature config build step to code coverage task 2022-03-21 16:05:45 -03:00
Lourens Schep d0ff85158e Run feature config from main working directory 2022-03-21 15:09:13 -03:00
Barry Hughes 3dc4f7cea6
Merge pull request #31238 from LuigiPulcini/add/generate-field-html
Add action hook to generate a custom field type.
2022-03-21 10:54:40 -07:00
Lourens Schep f82d3b7301 Remove feature config from repo and add it to the gitignore 2022-03-21 14:49:44 -03:00
barryhughes cadb25d1cf Amend `generate_generate_<CUSTOM>_html` hook docs. 2022-03-21 10:02:00 -07:00
Luigi Pulcini fc59fa5d5b converted action into filter 2022-03-21 09:47:52 -07:00
LuigiPulcini 6f5a8f4394 Add action hook to generate a custom field type
Adding a `woocommerce_generate_{$type}_html` action hook allows to generate the HTML output of a custom field type for those classes extending the `WC_Settings_API` (e.g. `WC_Email`).
2022-03-21 09:47:52 -07:00
Chi-Hsuan Huang 8ce25e6b1b Change @wordpress/data from devDependencies to peerDependencies
When @wordpress/data is included in devDependencies, all tests mocked @wordpress/data fails
2022-03-21 18:28:56 +08:00
Chi-Hsuan Huang 24595bd2cb Fix jest config paths 2022-03-21 18:28:05 +08:00
Chi-Hsuan Huang ffef8df540 Update possibly_update_note() to update other attributes 2022-03-21 12:03:29 +08:00
Chi-Hsuan Huang 58422dd008 Add $primary param back to add_action method
See https://github.com/woocommerce/woocommerce-admin/pull/8474/files#r829672400
2022-03-21 11:33:50 +08:00
Christopher Allford fdf88c0d94
Updated Core Build Script
Since the smoke and E2E tests don't use `nx` commands to build, we need to make sure
that the command they run builds our dependencies. In the future we should change
all of the scripts and Nx executors to make this all simpler.
2022-03-19 11:42:55 -07:00
Christopher Allford f988ab272a
Merge pull request #32124 from woocommerce/merge/wca-assets
Moved WooCommerce Admin Images
2022-03-18 16:55:21 -07:00
Christopher Allford d928a5e1a6 Added missing namespace import 2022-03-18 16:23:00 -07:00
Christopher Allford 0e4b42b732 Remove WCA package existence check 2022-03-18 16:00:56 -07:00
Christopher Allford 3feab4a747 Fixed Deprecated Notes Inclusion 2022-03-18 15:51:55 -07:00
Christopher Allford 6acfa7a037 Added React Client as Implicit Dependency
This makes sure that building WooCommerce builds the
react admin as well.
2022-03-18 15:46:48 -07:00
Christopher Allford 839b6ffbc6 Moved WooCommerce Admin Images
This commit moves the images from `plugins/woocommerce-admin/images`
to their new home in `plugins/woocommerce/assets/images`
2022-03-18 15:44:40 -07:00
Christopher Allford c4628b966b Removed WooCommerce Admin Package
This commit removes the WooCommerce Admin package from Core. The
result of this change is that the code for WooCommerce Admin will come
from the included content, rather than the previous package.
2022-03-18 15:30:00 -07:00
Christopher Allford 80c3858aa6 Removed WooCommerce Admin SSR Version
Since there's no such thing as WooCommerce Admin anymore,
we can remove it from the SSR.
2022-03-18 15:28:44 -07:00
Christopher Allford 3dd60322d5 Migrated WooCommerce Admin PHP Code
This commit moves all of the PHP code from `plugins/woocommerce-admin`
to its new home in `plugins/woocommerce`.

- `plugins/woocommerce-admin/src` -> `plugins/woocommerce/src/Admin`
- `plugins/woocommerce-admin/src-internal` -> `plugins/woocommerce/src/Internal`
- `plugins/woocommerce-admin/includes` -> `plugins/woocommerce/includes/react-admin`
2022-03-18 15:23:33 -07:00