Commit Graph

6631 Commits

Author SHA1 Message Date
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
Tomek Wytrębowicz a67188b52e Fix argument forwarding for npm script lint:js-fix.
Redo 7d1a6661f9.
2022-03-22 16:36:17 +01:00
Tomek Wytrębowicz 4714289838 Fix `packages/` path for npm script `lint:js`. 2022-03-22 16:35:12 +01: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 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 3dc5f95254 Update test mocks
Fix lint
2022-03-22 11:24:58 +08: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 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
Christopher Allford 93e44b3628 Updated React Admin Build Output
This changes the output of the React-based
admin client from WooCommerce Admin to
an appropriate location in the core plugin.
2022-03-18 14:53:25 -07:00
Christopher Allford d2d8d78be1 Moved WCA Packages
This commit moves all of the packages in
`plugins/woocommerce-admin/packages` to their
new home in `packages/js`.
2022-03-18 14:25:26 -07:00
Christopher Allford efb270ef27 Remove Husky from WooCommerce Admin 2022-03-18 14:07:30 -07:00
Christopher Allford dbf004023e Fixed PNPM Lockfile 2022-03-18 14:04:13 -07:00
Christopher Allford 3077c3752b Merge remote-tracking branch 'woocommerce/woocommerce-admin/main' into merge/woocommerce-admin 2022-03-18 13:56:18 -07:00
Christopher Allford da6ad73d18 Add workflow to block merges to main
With the migration of the feature plugin into the `woocommerce/woocommerce` repository, we're going to use this workflow to block content from being merged into `main`.
2022-03-18 13:13:49 -07:00
louwie17 4bff4d1302 Fix php notice when selecting paid theme (https://github.com/woocommerce/woocommerce-admin/pull/8493)
* Add initial E2E tests for purchase task

* Update paid theme logic to remove PHP warning and keep the correct price

* Fix php unit tests

* Address some PR feedback

* Add changelog

* Include the purchase task e2e test

* Disable test

* Delete purchase E2E test file
2022-03-18 16:05:38 -03:00
Viktor Szépe c45cb7a398 Merge remote-tracking branch 'wc/trunk' into patch-6 2022-03-18 17:42:35 +00:00
Christopher Allford d67041f0a7 Updated Composer to v2 2022-03-18 09:56:28 -07:00
Christopher Allford efbc635e32 Added Beta Tester Plugin To Nx
This commit adds the project file and makes the
necessary changes to the workspace to support
the new plugin.
2022-03-18 09:46:10 -07:00
Christopher Allford 7be60a5b52 Merge remote-tracking branch 'woocommerce/woocommerce-beta-tester/trunk' into merge/woocommerce-beta-tester 2022-03-18 09:42:18 -07:00
Chi-Hsuan Huang c05605fddf Update linting, testing, `@types/*` dependencies (https://github.com/woocommerce/woocommerce-admin/pull/8475)
* Update husky from 4 to 7

* Update @types/jest from 26 to 27

* Update lint-staged from 10 to 12

* Update babel-jest from 26 to 27

* Update @typescript-eslint/eslint-plugin from 4 to 5

* Update @typescript-eslint/parser from 4 to 5

* Update chalk from 4 to 5

* Update concurrently from 5 to 7

* Update stylelint from 9 to 14 and stylelint-config-wordpress from 13 to 17

* Update @wordpress/prettier-config from 0.4 to 1.1

* Update eslint from 7 to 8, @wordpress/eslint-plugin from 8 to 10, eslint-plugin-testing-library to 5

* Fix lint errors after updating eslint-plugin-testing-library

* Fix style lint

* Rename .stylelintrc.json -> stylelint.config.js & add todo comment

Fix stylelint.config.js

* Remove @wordpress/e2e-test-utils

* Add changelogs for eslint-plugin

* Update storybook/preview.js since addDecorator has been deprecated

Remove parameters

* Import directly from @storybook/addon-docs

* Migrate some stories to use @storybook/addon-controls

Add a comment for @storybook/addon-knobs

* Update changelogs

* Update preview.js to fix lint warning

* Update pnpm-lock.yaml

* Fix eslint layout errors (https://github.com/woocommerce/woocommerce-admin/pull/8484)
2022-03-18 19:45:14 +08:00
RJ d9714b55c3 Update webpack 4 to webpack 5 (https://github.com/woocommerce/woocommerce-admin/pull/8476)
* updated webpack to 5

* fix dependency extraction config

* port unminify.js to webpack 5

* updated packages webpack version

* changelogs

* Updated @wordpress/custom-templated-path-webpack-plugin

- also removed Terser from package.json

* Upgraded storybook config to webpack 5
2022-03-18 18:59:05 +08:00
Chi-Hsuan Huang 8277860a19 Fix wc-admin-php-test-suite Dockerfile (https://github.com/woocommerce/woocommerce-admin/pull/8492) 2022-03-18 18:48:44 +08:00
Peter Fabian 9ffaf34c23
Merge pull request #31609 from woocommerce/update/product-block-templates-meta-box
Allow relevant block templates to be listed in the Edit Product view
2022-03-18 11:13:11 +01:00
Peter Fabian 59b941b239 Added approval feature for downloadable files 2022-03-18 10:26:32 +01:00
Peter Fabian 6e9ed9a83a Cast limit to int in all branches. 2022-03-18 10:10:08 +01:00
Peter Fabian c4b965e543 Fix error messages for order endpoints. 2022-03-18 10:04:09 +01:00
Chi-Hsuan Huang 89e7d145f4 Fix `next_week_start` logic (https://github.com/woocommerce/woocommerce-admin/pull/8468)
* Fix next_week_start logic

* Add changelog

* Update function docs for definitions of week end and week start
2022-03-18 12:18:16 +08:00
Moon a7645fa07d Allow CLI environments to run the install routines (https://github.com/woocommerce/woocommerce-admin/pull/8488) 2022-03-17 20:17:25 -07:00
Chi-Hsuan Huang 4de940111c Remove `is_primary` column from the `wp_wc_admin_notes` table (https://github.com/woocommerce/woocommerce-admin/pull/8474)
* Remove is_primary column from the wc_admin_notes table

* Add changelog
2022-03-18 09:17:35 +08:00
Chi-Hsuan Huang 0a75b1b657 Refactor the `onFilterChange` method in the `AdvancedFilters` component (https://github.com/woocommerce/woocommerce-admin/pull/8459)
* Refactor the onFilterChange method in the AdvancedFilters component to use object params

* Fix advanced-filters/stories currency undefined error

* Add changelog

* Update changelog
2022-03-18 09:16:32 +08:00
Barry Hughes d2966e0fca
Merge pull request #32081 from johnregan3/31824-add-order-id-to-error
Include order ID in the error log message
2022-03-17 15:12:16 -07:00
Christopher Allford b63091bee0
Merge pull request #32075 from woocommerce/update/woocommerce-blocks-7.2.0
Update WooCommerce Blocks package to 7.2.0
2022-03-17 15:11:53 -07:00
Joshua T Flowers 611903ef5d Separate onboarding concerns into separate classes (https://github.com/woocommerce/woocommerce-admin/pull/8280)
* Separate onboarding concerns into separate classes

* Fix up onboarding product types

* Fix up references to profile data option

* Fix up call to allowed themes

* Move onboarding features to internal namespace

* Remove old onboarding redirect

* Fix failing tests

* Add changelog entry

* Move inernal classes to the new src-internal folder

* Fix lint error

* Add deprecated class for Onboarding

* Add empty construct method

* Remove some of the unnecessary static functions and make sure OnboardingTasks still gets initialized

* Fix missed changes during rebase

* Fix tests

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-03-17 17:10:43 -03:00
9ete b662d2b450 fix/30156: prevent 'Search' field from overflowing container on the 'Downloadable product permissions' widget when in the sidebar on the admin order detail page 2022-03-17 13:42:08 -05:00
Jorge A. Torres f32b9c813b
Merge pull request #31940 from pcarrier/pcarrier/whatismyipaddress
class-wc-geolocation.php: drop bot.whatismyaddress.com, introduce tnedi.me
2022-03-17 11:38:51 -05:00
Peter Fabian 9c48710497
Merge pull request #32067 from woocommerce/add/primary-key-to-product-attributes-lookup-table
Add a primary key to the product attributes lookup table.
2022-03-17 17:17:43 +01:00
John Regan 9994291d33
31824 Add translator note
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-03-17 08:11:20 -05:00
Tomek Wytrębowicz ae89e6ae20 Suppress `lint:js` warnings in CI and GitHub PRs (https://github.com/woocommerce/woocommerce-admin/pull/8020)
- Add returned type annotations to `packages/admin-e2e-tests/src/elements/*.ts` and `packages/admin-e2e-tests/src/*.ts`.
- Remove unused vars from `packages/admin-e2e-tests/src/*.ts`.
- Simplify `unknown` type union.

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-03-17 12:13:37 +01:00
Néstor Soriano 04a96f0c5b
Merge pull request #32076 from woocommerce/fix/31244-paypal-admin-js
Minify updated PayPal admin JS.
2022-03-17 10:57:05 +01:00
Chi-Hsuan Huang 6d139e063d Fix industry tab not clickable after going back (https://github.com/woocommerce/woocommerce-admin/pull/8469)
* Fix industry tab not clickable after going back

* Add changelog

* Add e2e test for testing industry tab going back

* Add changelog

* Add navigate to fix the test
2022-03-17 17:39:50 +08:00
Nestor Soriano ad55634ea5
Add error logging to DataRegenerator::create_table_primary_index 2022-03-17 09:31:26 +01:00
renovate[bot] 8e6d8c829e Update dependency @automattic/explat-client-react-helpers to ^0.0.4 (https://github.com/woocommerce/woocommerce-admin/pull/8471)
* Update dependency @automattic/explat-client-react-helpers to ^0.0.4

* Reverted patch for building @automattic/explat-client-react-helpers

* Updated pnpm-lock.yaml

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rjchow <me@rjchow.com>
2022-03-17 11:15:12 +08:00
Moon 2ea4d92c30 Translate dates in NewSalesRecord note (https://github.com/woocommerce/woocommerce-admin/pull/8426)
* Translate dates

* Add changelog

* Add test

* Fix broken tests
2022-03-16 14:03:43 -07:00
louwie17 b2e83899b3 Add/8269 rest api docs (https://github.com/woocommerce/woocommerce-admin/pull/8429)
* Internalize all WooCommerce Admin main API controllers

* Internalize all report and report stat controllers

* Make function public and label as internal to fix PHP unit tests

* Add changelog
2022-03-16 14:46:48 -03:00
Tam Mullen 76deb8b6a1
Include link to e2e boilerplate in e2e Readme 2022-03-16 15:43:49 +00:00
John Regan 53473a6aa5 31824 Remove test code 2022-03-16 09:21:20 -05:00
John Regan 05427269db Merge branch 'trunk' into 31824-add-order-id-to-error 2022-03-16 09:19:33 -05:00
John Regan 8dbc76ef2b fix/31824 - Initial commit 2022-03-16 09:19:18 -05:00
Nestor Soriano fc4a71d9b8
Don't use ADD PRIMARY KEY IF NOT EXISTS as it's not supported by MySQL
Instead, manually check if the key exists and create it if not.
2022-03-16 13:18:22 +01:00
renovate[bot] 3f3f25f4b7 Update dependency mariadb to v10.8.2 (https://github.com/woocommerce/woocommerce-admin/pull/8473)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-16 11:15:01 +08:00
Chi-Hsuan Huang a9fe13e80b Add capability for ExPlat integration to authenticate WPCOM users (https://github.com/woocommerce/woocommerce-admin/pull/8428)
* Add @wordpress/api-fetch to explat/package.json

* Export auth exPlat utils

* Support request assignment as wpcom user

* Add experiments proxy api for js

* Update error response

* Add changelog

* Update pnpm-lock.yaml

* Change error type

* Update explat/README.md

* Update includes/class-experimental-abtest.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Fix get explat /assignments

* Fix url & add comment to assignment.ts

* Fix cors issue

* Fix php test

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-03-16 11:03:10 +08:00
Renovate Bot 84a7c24599 Update dependency jest-environment-jsdom to ~27.5.0 2022-03-16 02:58:10 +00:00
Shohei Tanaka 8ba55cd021 Escape processing missing
It was escaped in other email templates, but not here.
2022-03-15 17:19:30 -05:00
Jorge A. Torres ca7bedd249
Merge pull request #31987 from woocommerce/fix/internal-links-in-readmes
Fix internal links in README files
2022-03-15 15:38:46 -05:00
Jacob Sewell 463394f3db Create lookup_notes method to bypass woocommerce_note_where_clauses filter. (https://github.com/woocommerce/woocommerce-admin/pull/8387)
* Add args_to_where_clauses() and lookup_notes() methods to Admin\Notes\DataStore.
For use by internal code to bypass woocommerce_note_where_clauses filter.

* Changelog for 8385/8387.

* Add some linter whitelist notation to preexisting warnings in class-wc-test-notes-data-store.

* Add unit tests for the differences between lookup_notes() and get_notes().

* Minor text fix in changelog for 8385/8387.

* Better explanation in pagination tests in test_lookup_notes_versus_get_notes().

* All Notes created by WC_Tests_Notes_Data_Store should have source and name values.

* Add tearDown method to WC_Tests_Notes_Data_Store to delete test-created Notes.
2022-03-15 14:24:09 -05:00
barryhughes 72e00f9f99 Minify updated PayPal admin JS. 2022-03-15 11:09:24 -07:00
louwie17 f37af20b5f New task list version 1 (https://github.com/woocommerce/woocommerce-admin/pull/8457)
* Allow for easy task component switch

* Add past tense feature addition with cross out

* Add visible option for task lists and make use of new feature config

* Fix lint errors

* Fix lint errors

* Fix css lint

* Fix js unit tests

* Address PR feedback

* Add js tests for task list changes

* Add php tests for updated logic

* Add changelog

* Update copy

* Make snooze test a little more robust
2022-03-15 14:40:22 -03:00
Nestor Soriano eb94672f76
Delete the (now redundant) product_or_parent_id_term_id index
in the product attributes lookup table.
2022-03-15 17:03:51 +01:00
Nestor Soriano 904ec4343c
Fix misc links in READMEs and GitHub templates. 2022-03-15 16:01:12 +01:00
Fernando 9a704ad1e2 Remove class `ExtendedPayments`. (https://github.com/woocommerce/woocommerce-admin/pull/8461)
* Removed class `ExtendedPayments`

* Add changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-03-15 09:10:40 -03:00
Mike Jolley 2e3937d68e Composer update 2022-03-15 11:50:10 +00:00
Mike Jolley 8740ec4de1 Update WooCommerce Blocks package to 7.2.0 2022-03-15 11:50:03 +00:00
Chi-Hsuan Huang eb2777f344 Update @types/wordpress__notices (https://github.com/woocommerce/woocommerce-admin/pull/8464) 2022-03-15 17:35:18 +08:00
Chi-Hsuan Huang 7514af2801 Update `@woocommerce/date` documentation (https://github.com/woocommerce/woocommerce-admin/pull/8465)
* Update packages/date README.md

* Update headings
2022-03-15 17:34:33 +08:00
anitaamurthy c335c7322e Fixed failing unit tests in Version2/product-reviews 2022-03-15 14:41:39 +05:30
Moon b2d32e9e72 Add required dependencies for pnpm nx build {package} command (https://github.com/woocommerce/woocommerce-admin/pull/8436)
* Add required dependencies for pnpm nx install {package} command

* Update pnpm lock file

* Add missing deps for packages/*

* Change to use relative imports for packages/components

* Move ts from deps to devDeps

* Add rimraf to packages/* devDependencies for clean command

* Add webpack cli to packages dependencies

* Add jest-cli to packages devDependencies

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-03-14 20:04:46 -07:00
Moon 8232b226f7 Use constant to construct image URLs (https://github.com/woocommerce/woocommerce-admin/pull/8451)
* Add WC_ADMIN_IMAGES_FOLDER constant

* Use WC_ADMIN_IMAGES_FOLDER to construct image URL

* Rename WC_ADMIN_IMAGES_FOLDER to WC_ADMIN_IMAGES_FOLDER_URL

* Use WC_ADMIN_IMAGES_FOLDER_URL to construct image URLs

* Move wcpay-banner.png to client dir

* Move wcpay-banner.png to client dir

* Use WC_ADMIN_IMAGES_FOLDER_URL for wcAdminAssetUrl

* Use WC_ADMIN_IMAGES_FOLDER_URL to construct image URLs

* Use WC_ADMIN_IMAGES_FOLDER_URL to construct image URLs

* Revert to images

* Add / to the path
2022-03-14 15:01:03 -07:00
Jorge A. Torres 7ffd4f2f85
Merge pull request #31979 from woocommerce/add/commment-about-db-updates-on-install
Add code comments clarifying database updates on new WooCommerce installs
2022-03-14 16:20:46 -05:00
Matt Sherman 1ccb11c0f6 Experimental: Add filters to allow simple products to be included in Variations analytics report (https://github.com/woocommerce/woocommerce-admin/pull/8462) 2022-03-14 17:06:05 -04:00
louwie17 8d4471fce4 Fix paid themes (https://github.com/woocommerce/woocommerce-admin/pull/8412)
* Add support for paid themes

* Fix lint errors

* Add changelog

* Refactor get_products logic and add unit tests

* Add comment
2022-03-14 17:31:03 -03:00
Joel Thiessen 8465c10917 Display WCPay task when installed via subscriptions option on profiler (https://github.com/woocommerce/woocommerce-admin/pull/8445) 2022-03-14 12:44:55 -07:00
Nestor Soriano 1caf5aa7da
Add a primary key to the product attributes lookup table. 2022-03-14 11:30:54 +01:00
Chi-Hsuan Huang 4ec162bab0 Add ":preserveSemverRanges" to renovate.json (https://github.com/woocommerce/woocommerce-admin/pull/8466) 2022-03-14 17:18:04 +08:00
Chi-Hsuan Huang d797b658c6 Add `moment-timezone` to `@woocommerce/components` package.json (https://github.com/woocommerce/woocommerce-admin/pull/8458)
* Add moment-timezone to package.json

* Add changelog
2022-03-14 17:07:21 +08:00
Job 94729ca032 Update wc-setup.scss 2022-03-11 18:05:06 -05:00
Job 98376d4ec4 Update class-wc-settings-emails.php 2022-03-11 18:05:06 -05:00
Jorge A. Torres ae2a7af951
Merge pull request #30763 from szepeviktor/patch-5
Remove stray unset from wc_update_200_line_items
2022-03-11 16:31:38 -05:00
Viktor Szépe 5963c564cb Remove stray unset from wc_update_200_line_items
Discovered by @phpstan
2022-03-11 15:41:56 -05:00
Jorge A. Torres 8af58a5e93
Merge pull request #32000 from woocommerce/fix/csv-import-failure-formatting
Allow limited HTML when rendering failure messages (CSV import).
2022-03-11 14:51:21 -05:00
Vedanshu Jain e8e5823423
Merge pull request #32041 from woocommerce/add/rate-limit-remaining-column
Add rate_limit_remaining column to wc_rate_limits table
2022-03-11 20:46:41 +05:30
Vedanshu Jain 4303fbbce3
Merge pull request #30948 from woocommerce/add/hook-to-display-metadata
Add wrapper for `get_formatted_meta_data` to make `$include_all` default to `true`
2022-03-11 20:44:19 +05:30
Fernando b11bae047a Removed not used `OnboardingEmailMarketing` (https://github.com/woocommerce/woocommerce-admin/pull/8446)
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-03-11 10:43:40 -03:00
Jacob Sewell 2a7df822b3 Avoid get_notes() in Notes::possibly_delete_survey_notes() (https://github.com/woocommerce/woocommerce-admin/pull/8206)
* Query for admin survey note_ids directly in Notes::possibly_delete_survey_notes().

* Add get_notes_with_type( $note_type ) method to Automattic\WooCommerce\Admin\Notes.
Name selected for consistency with preexisting get_notes_with_name( $name ) method.

* Use new get_notes_with_type() in Notes::possibly_delete_marketing_notes().

* Use new get_notes_with_type() in Notes::possibly_delete_survey_notes().

* Correct copy-pasta error querying for MARKETING notes instead of SURVEY notes in possibly_delete_survey_notes().

* Only delete actioned notes in possibly_delete_survey_notes(), which was the previous behavior.

* Changed get_notes_with_type() to get_note_ids_by_type() in Notes data store.

* Changelog for 7987/8206.

* Add missing method name in changelog for 7987/8206.
2022-03-10 18:57:29 -06:00
Chi-Hsuan Huang 7c8c0ee893 Fix failing `test_cancel_import` and `WC_Tests_API_Reports_Variations` php tests (https://github.com/woocommerce/woocommerce-admin/pull/8456)
* Assert the pending action explicitly to fix failing test_cancel_import with latest woo

* Use function lambda

* Fix WC_Tests_API_Reports_Variations by assigning parent_id to variations
2022-03-11 06:39:59 +08:00
Chi-Hsuan Huang 03c428969c Fix possibly_update_note get_content() on null (https://github.com/woocommerce/woocommerce-admin/pull/8455) 2022-03-11 06:39:45 +08:00
Barry Hughes 8be6eb4a63 Update plugins/woocommerce/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php 2022-03-10 10:48:01 -06:00
Peter Fabian 8d8a556e5c Fixed docs. 2022-03-10 10:48:01 -06:00
Peter Fabian ce37800178 Fixed the order id fetching 2022-03-10 10:48:01 -06:00
Peter Fabian 95ec1fc56e Receiver email set separately for bw compat 2022-03-10 10:48:01 -06:00
Vedanshu Jain b1b68f52cd Fix object reference
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-03-10 10:48:01 -06:00
Nestor Soriano 3e1acd113b Create a new WC_Gateway_Paypal_Response::check_response_for_order method
Adding a new parameter to the existing check_response method could cause
backwards incompatibility issues in inherited classes, so we deprecate
the old method and create a new one instead.
2022-03-10 10:48:01 -06:00
Jorge A. Torres 8bb2b57f65 Make PayPal Standard PDT notification validation more strict 2022-03-10 10:48:01 -06:00
berislav grgičak a2a53ab6c2 Fix legend item width (https://github.com/woocommerce/woocommerce-admin/pull/8442)
* Fix legend item width

* Add testing instructions

* Add changelog entry

* Fix changelog

* Add changelog
2022-03-10 15:09:45 +01:00
louwie17 7bba8dcdee Rename Settings.php to more specific name and create new Settings.php class to handle WooCommerce Admin settings (https://github.com/woocommerce/woocommerce-admin/pull/8443) 2022-03-10 09:42:55 -04:00
Peter Fabian 6c009e5276
Merge pull request #32007 from woocommerce/spotfix/return-type
Correct type in @return tag (to string).
2022-03-10 13:56:47 +01:00
Barry Hughes 42ec5e18c0
Merge pull request #30602 from sicelo/patch-1
Fix symbol for SZL currency.
2022-03-09 19:37:15 -08:00
Barry Hughes 28b2acb373
Merge pull request #32031 from helgatheviking/issues/30187-has_options
Add has_options to product REST API response. Closes #30187.
2022-03-09 14:23:55 -08:00
barryhughes 57a7f94fe9 Tweak field description. 2022-03-09 12:31:46 -08:00
barryhughes 17744d5aa6 Update tests to account for the 'has_options' property. 2022-03-09 12:18:29 -08:00
Joel Thiessen db258aeb10 Fixing home item appearing in extensions menu on Woo Navigation (https://github.com/woocommerce/woocommerce-admin/pull/8432) 2022-03-09 08:07:29 -08:00
louwie17 c65d43a35e Cleanup Loader.php and move it to Internal namespace (https://github.com/woocommerce/woocommerce-admin/pull/8416)
* Seperated Asset, page, and translation logic into seperate classes out of Loader.php

* Move user, and assets logic out of Loader.php

* Move Loader to Internal and move page helper functions to PageController

* Fix unit tests

* Add changelog
2022-03-09 10:04:34 -04:00
renovate[bot] eeaafb911a Update dependency @woocommerce/e2e-environment to ^0.2.3 || ^0.3.0 (https://github.com/woocommerce/woocommerce-admin/pull/8438)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-09 11:34:45 +08:00
renovate[bot] 17ef9c0533 Update actions/setup-node action to v2.5.1 (https://github.com/woocommerce/woocommerce-admin/pull/8437)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-09 11:02:52 +08:00
renovate[bot] 2d706ebbd0 Update saulmaldonado/skip-workflow action to v1.1.1 (https://github.com/woocommerce/woocommerce-admin/pull/8435)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-09 11:02:30 +08:00
roykho 8d57884a70
Cherry picked sec changes 2022-03-08 13:00:34 -08:00
roykho 9cd2a2bce1
Update readme 2022-03-08 12:56:16 -08:00
Fernando f5316d02af Make individual note classes internal (https://github.com/woocommerce/woocommerce-admin/pull/8398)
* Moved `WooSubscriptionsNotes`

* Moved `WooSubscriptionsNotes` deprecated

* Moved `WooCommerceSubscriptions`

* Moved `WooCommercePayments`

* Fix `WooCommerceSubscriptions`

* Fix `WooSubscriptionsNotes

* Fix `WooCommercePayments`

* Moved `WelcomeToWooCommerceForStoreUsers

* Add use `Note`

* Moved `UpdateStoreDetails`

* Moved `UnsecuredReportFiles`

* Moved `TrackingOptIn`

* Moved `TestCheckout`

* Moved `SetUpAdditionalPaymentTypes`

* Moved `SellingOnlineCourses`

* Moved `RealTimeOrderAlerts`

* Moved `PersonalizeStore`

* Moved `PerformanceOnMobile`

* Moved `PaymentsRemindMeLater`

* Moved `OrderMilestones`

* Moved `OnlineClothingStore`

* Moved `OnboardingPayments

* Moved `NewSalesRecord`

* Moved `NavigationNudge`

* Moved `NavigationNudge`

* Moved `MobileApp`

* Moved `MigrateFromShopify`

* Moved `MarketingJetpack`

* Moved `ManageStoreActivityFromHomeScreen`

* Moved `ManageOrdersOnTheGo`

* Moved `MagentoMigration`

* Moved `LaunchChecklist`

* Moved `InstallJPAndWCSPlugins`

* Moved `InsightFirstSale`

* Moved `InsightFirstProductAndPayment`

* Moved `GivingFeedbackNotes`

* Moved `FirstProduct`

* Moved `FirstDownlaodableProduct`

* Moved `EUVATNumber`

* Moved `EditProductsOnTheMove`

* Moved `DeactivatePlugin`

* Moved `CustomizingProductCatalog`

* Moved `CustomizeStoreWithBlocks`

* Moved `CouponPageMoved`

* Moved `CompleteStoreDetails`

* Moved `ChoosingTheme`

* Moved `AddingAndManangingProducts`

* Moved `AddFirstProduct`

* Removed `OnboardingTraits` trait

* Moved `EmailNotification`

* Fixed notes

* Add changelog

* Fix lint error

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-03-08 10:55:27 -03:00
Mike Jolley 3450112f39 Add rate_limit_remaining column to wc_rate_limits table 2022-03-08 12:25:54 +00:00
anitaamurthy acbb448f6b Updated existing unit tests 2022-03-08 13:55:11 +05:30
anitaamurthy 014d64a941 Added product name + permalink to the GET Reviews API endpoint response 2022-03-08 13:36:09 +05:30
Chi-Hsuan Huang 1335fe4a1a Fix long notes are not replaced with shorter notes (https://github.com/woocommerce/woocommerce-admin/pull/8401)
* Add possibly_update_note to replace long notes with shorter notes

* Add changelog

* Refactor possibly_update_note
2022-03-08 12:07:14 +08:00
Moon 86b94e64c3 Run woocommerce_admin_updated as a scheduled action (https://github.com/woocommerce/woocommerce-admin/pull/8423)
* run woocommerce_admin_updated as a scheduled action

* Rename the action
2022-03-07 18:26:09 -08:00
Chi-Hsuan Huang 9aba93d127 Update all js packages with minor/patch version changes (https://github.com/woocommerce/woocommerce-admin/pull/8392)
* Update all js packages with minor/patch version changes

* Add changelog

* Fix packages/data types errors

* Update data/CHANGELOG.md

* Fix puppeteer version

* Fix packages/data > countries error types

* Make data key optional in RestApiError
2022-03-08 10:11:12 +08:00
Moon 1860aeba28 Use update_option instead of delete_option + add_option (https://github.com/woocommerce/woocommerce-admin/pull/8421) 2022-03-07 17:58:51 -08:00
Joshua T Flowers 834307e155 Merge payment gateway suggestion classes into single source of truth (https://github.com/woocommerce/woocommerce-admin/pull/8252)
* Rename route to payment gateway suggestions

* Create separate payment gateway suggestions controller

* Move payment gateway logic into feature class

* Merge payment gateway information into single source of truth

* Filter out WCPay client-side

* Fix up frontend

* Redirect to payment settings page on install

* Add test around showing installed gateways

* Remove check for marketplace suggestions at the endpoint level

* Fix up payment gateway conflicts after rebase

* Handle PR feedback

* Optimistically dismiss the payment gateway suggestions

* Add changelog entry

* Add square_image support for new API param

* Fixed lint error

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-03-07 09:15:06 -04:00
Chi-Hsuan Huang ac660167a0 Reintroduce emphasis on inbox note action button (https://github.com/woocommerce/woocommerce-admin/pull/8411)
* Reintroduce emphasis on inbox note action button

* Add changelog

* Remove actioned note gray color style
2022-03-07 17:14:49 +08:00
Chi-Hsuan Huang be7e73d484 Use integers for add_menu_page priority (https://github.com/woocommerce/woocommerce-admin/pull/8399)
* Use integers for menu page priority

 In wordpress >= 6.0, the seventh parameter passed to add_menu_page() should be an integer representing menu position.

* Add changelog

* Fix Analytics & WcPayWelcomePage menu positions
2022-03-07 17:12:24 +08:00
Chi-Hsuan Huang 6c474ed5cb Fix "docs" command (https://github.com/woocommerce/woocommerce-admin/pull/8410) 2022-03-07 13:39:48 +08:00
Chi-Hsuan Huang 3dff2fe11e Fix inbox letters truncator to support multi characters (https://github.com/woocommerce/woocommerce-admin/pull/8404)
* Install grapheme-splitter

* Support multi-characters Unicode letters for inbox html truncator

* Fix truncateRenderableHTML length compare

* Change note to immutable

* Add changelog

* Use hasChildNodes() to check if we should call truncateElement

* Add tests for truncate()
2022-03-07 12:09:26 +08:00
helgatheviking 7ac79aa6d7 Add has_options to product REST API response. Closes #30187. 2022-03-05 15:05:13 -07:00
Chi-Hsuan Huang 86fc8b62e5 Switch to pnpm (https://github.com/woocommerce/woocommerce-admin/pull/8349)
* Add pnpm-workspace.yaml

* Add missing dependencies & replace file: with workspace:* in
package.json

* Replace "npm" with "pnpm"

* Replace "npx" with "pnpx"

* Remove package-lock.json

* Add pnpm setup action to github workflows

* Update webpack babel exclude path

* Upgrade woo e2e and fix e2e test command

Update e2e.yml

Use pnpm run e2e:docker-up in e2e.yml

* Remove unused docker-compose.yaml

* Replace lerna with pnpm commands

Update publish commands

* Exclude _locutus_shared_bc.js in babel.config.js

* Add .npmrc to set enable-pre-post-scripts=true by default

* Fix storybook babel config

Update babel.config.js

* Add changelog

* Update pnpm-lock.yaml

* Replace pnpx with pnpm exec

* Update pnpm-lock.yaml

* Remove js-tests/package-lock.json

* Fix @woocommerce/tracks -> workspace:*

* Update pnpm-lock.yaml

* Add @woocommerce/experimental to onboarding/package.json

* Add "@woocommerce/component" to onboarding/package.json

* Update pnpm-lock.yaml

* Use || instead of && for "test:watch"

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>

* Fix packages/number "clean" command

* Add root: true to .eslintrc.js to enforce it to use the root config file

* Exclude packages/**/node_modules from babel transpiling

* Fix js-tests build config

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
2022-03-04 12:01:16 +08:00
Barry Hughes 8bc310008c
Merge pull request #31877 from iamdharmesh/fix/29445
Fixed clear cart after payment for block-based themes/themes without a header template.
2022-03-03 15:45:54 -08:00
Roy Ho 1e743fec74
Merge pull request #32013 from felipelousantos/fix/wp-version-compatibility
Update the WP version compatibility
2022-03-03 12:21:38 -08:00