Commit Graph

7938 Commits

Author SHA1 Message Date
Ilyas Foo 368d8ac4fc
TimeInterval test fix expected 5 weeks instead of 6 (#33227)
* Fix expected 5 weeks instead of 6

* Changelog
2022-05-27 15:08:40 +08:00
Néstor Soriano 64c6803640
Improve unit testing infrastructure (#33140)
* Add infrastructure for mocking globals in unit tests.

- 'get_global' method in LegacyProxy, MockableLegacyProxy and WC().
- 'register_global_mocks' method in MockableLegacyProxy.
- 'register_legacy_proxy_global_mocks' method in WC_Unit_Test_Case.

* Add the DynamicDecorator class, and unit tests for it.

* Add the StringUtil::contains method

* Add unit tests for error logging on PostsToOrdersMigrationController

* Update README file to mention improvements in unit testing infrastructure

- Mention the mechanism to mock globals using the LegacyProxy
- Mention the code hacker and the DynamicDecorator

* Add changelog file
2022-05-27 11:43:31 +05:30
Ilyas Foo ca4e3606b1
Fix dashboard and analytics crashing (#33206)
* Set timezone before calling get_weekstartend and after to preserve original timezone

* Add test for timezone check

* Update calculation to be timezone agnostic and add tests

* Changelog
2022-05-27 10:08:46 +08:00
Chi-Hsuan Huang 4a6c6e739c
Update woocommerce-admin `test:watch` command (#33202)
* Update woocommerce-admin test:watch command

Only watch admin ./client folder

* Add changelog
2022-05-27 10:08:34 +08:00
Matt Harrison 3ac62945c1
Allow filtering of cookie flags, which enables setting of samesite (#33219)
Allow filtering of cookie flags, which enables setting of `samesite`.

* Break out filter so the same filter can be used for any version of PHP.
* Add docblocks and other linting fixes; add changelog.

Props: David Anderson <DavidAnderson684@users.noreply.github.com>
2022-05-26 16:40:16 -07:00
Kathy 8edc32c7fb
Cleanup twentytwenty notice styles. Closes #29529. (#33182)
Cleanup twentytwenty notice notices. Closes #29529.

* Increase width of border for notices
* Make notice buttons black to provide sufficient contrast
* Add changelog.
2022-05-26 16:15:49 -07:00
Joshua T Flowers e4824b9660
Add tracks to new product and edit product screens (#33120)
* Move product list tracks to seperate file

* Change product list tracks to TS

* Check init of tracks on client-side

* Add new product tracks

* Add product screen tracks

* Add product edit tracks

* Localize product screen variable

* Add changelog entry

* Handle PR feedback

* Track date changes on edit
2022-05-26 16:56:22 -04:00
Joshua T Flowers 2294082869
Fix report days calculation to account for DST (#33036)
* Fix report days calculation to account for DST

* Add tests around month with DST

* Update tests to use EST timezone
2022-05-26 16:55:54 -04:00
jonathansadowski bf02f377e6
Prepare trunk for 6.7 (#33215)
* Prepare trunk for 6.7

* Update composer.json and package.json for 6.7
2022-05-26 15:49:37 -05:00
jonathansadowski 0c619cbafe
Remove empty changelog file for updating minimum wp version (#33213) 2022-05-26 15:02:39 -05:00
Paul Sealock 37905dd178
Analyzer CLI: Add Database scanning (#33084) 2022-05-27 07:52:39 +12:00
jonathansadowski 66633dfe1a
Remove changelog files for cherry-picked PRs #32940 and #33171 (#33209) 2022-05-26 12:25:22 -05:00
jonathansadowski cd520c0e53
Update minimum wp version in woocommerce.php (#33194)
* Update minimum wp version

* Add changelog file for minimum wp version update

* Update required WP version in readme.txt
2022-05-26 08:39:24 -05:00
Chi-Hsuan Huang 13fe9b4970
Merge pull request #32644 from woocommerce/update/reports-datastore-date-column
Replace the date_created column name with a class property in the analytics DataStore
2022-05-26 09:24:15 +08:00
Jonathan Lane f70afccec9
Merge pull request #33139 from woocommerce/e2e/rep-playwright-feature-flag
Run Playwright tests behind feature flag
2022-05-25 14:55:23 -07:00
“Chris 58abc685cb Add changelog 2022-05-25 16:36:22 +03:00
Christos Lilitsas d057225e07
Add default value to `db_datetime_format` for back compatibility
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-05-25 16:26:20 +03:00
louwie17 ddb3239a1c
Merge pull request #33163 from woocommerce/fix/leaderboard-menu-styling
Fix the styling of the frame in the Leaderboard section of Analytics.
2022-05-25 10:14:32 -03:00
AnnaMag 165d3b659a Add changelog 2022-05-25 14:16:20 +02:00
Chi-Hsuan Huang 0240a29eb6
Merge pull request #33168 from woocommerce/dev/migrate-woo-data-options-to-ts
Migrate `@woocommerce/data` options store to TS
2022-05-25 13:20:07 +08:00
Jonathan Sadowski 4ece2489db Add changelog entry for update of Action Scheduler to 3.4.1 2022-05-24 15:48:02 -05:00
Jonathan Sadowski 7fbb8ba1d9 Update Action Scheduler to 3.4.1 2022-05-24 15:42:14 -05:00
Joel Thiessen 5f56ecb9b0
Suppressing warnings for malformed metadata in product template downloads #32971 #32971 2022-05-24 11:12:02 -07:00
jonathansadowski 22375b34f4
Merge pull request #32940 from woocommerce/update/woocommerce-blocks-7.6.0
Update WooCommerce Blocks package to 7.6.0
2022-05-24 09:25:51 -05:00
Chi-Hsuan Huang 4d9e07bbd4 Add changelogs 2022-05-24 21:41:36 +08:00
Chi-Hsuan Huang 55dfa78ebb Fix type errors in ./client after migrating options store to TS 2022-05-24 21:41:36 +08:00
Peter Fabian 59f6ffa027
Merge pull request #33130 from woocommerce/add/schema-output
Add script to get db schema from CLI
2022-05-24 15:20:56 +02:00
Joshua T Flowers 97eecfdcc4
Use term ID to query category IDs in analytics (#33164)
* Use term ID to query category IDs in analytics

* Add changelog entry
2022-05-24 09:10:58 -04:00
Chi-Hsuan Huang 773ab10c61 Add translator domain to texts 2022-05-24 17:24:54 +08:00
Chi-Hsuan Huang 1b8e90b529 Remove unnecessary completion time track 2022-05-24 17:09:53 +08:00
Chi-Hsuan Huang 8ff2c334d7 Fix missing translation domain 2022-05-24 16:56:16 +08:00
Chi-Hsuan Huang 3613ccb23e Add changelog 2022-05-24 15:43:29 +08:00
Chi-Hsuan Huang e2cc91dd60 Add confirmation dialog before loading the sample products 2022-05-24 15:43:27 +08:00
Chi-Hsuan Huang 86553fbe1f Add load sample product confirm modal 2022-05-24 15:00:17 +08:00
Ilyas Foo 78f96109da
Fix PHP notice when `woocommerce_admin_disabled` filter is used (#33154)
* Add array key check

* Changelog
2022-05-24 12:14:28 +08:00
Paul Sealock 3b51144011 add wc- namespace 2022-05-24 14:22:03 +12:00
AnnaMag af7f738704 Fix the styling of the frame in the Leaderboard section of Analytics. 2022-05-23 17:30:47 +02:00
Chi-Hsuan Huang c83dedd849
Merge pull request #33153 from woocommerce/dev/33132-migrate-woo-onboarding-to-ts
Migrate `@woocmmerce/onboarding` to TS
2022-05-23 18:33:00 +08:00
Néstor Soriano 484e790d99
Merge pull request #32864 from woocommerce/add/32385-cot-admin-list-table
Admin list table [COT]
2022-05-23 12:05:52 +02:00
Néstor Soriano 7c9eddf251
Merge pull request #26965 from RiLaRos/master
Update add precision function when pass empty string parameter
2022-05-23 09:13:49 +02:00
Chi-Hsuan Huang 637ea244ea Add changelog 2022-05-23 13:28:31 +08:00
Chi-Hsuan Huang 485d858fc3 Remove onboarding task @ts-expect-error and fix related type errors 2022-05-23 13:27:11 +08:00
Jonathan Sadowski d2eefc4467 Remove pending 6.6 changelog files 2022-05-20 13:58:09 -05:00
barryhughes c9ebffda40 Improve menu integration (classic as well as the new WC Admin nav feature). 2022-05-20 13:52:40 +00:00
barryhughes 715544f811 Resolve conflicts. 2022-05-20 13:51:41 +00:00
barryhughes b30bd2a85a Tighten baseline order query to only fetch regular orders (not refunds). 2022-05-20 13:44:50 +00:00
barryhughes 9f58514350 Add changelog. 2022-05-20 13:44:50 +00:00
barryhughes e1c771337f Add enhanced (Marketplace-ready) 'no results' view. 2022-05-20 13:44:50 +00:00
barryhughes 6dde512e79 Do not remove WC Admin nav from existing CPT admin list table. 2022-05-20 13:44:50 +00:00
barryhughes 1aa6265544 Tidy. 2022-05-20 13:44:50 +00:00
barryhughes 0ecffb416f Tweak logic responsible for registering COT admin list table. 2022-05-20 13:44:50 +00:00
barryhughes 8b30cf2639 Connect new list table with WC Admin nav. 2022-05-20 13:44:50 +00:00
barryhughes e27b89a7e8 Align column names with original WP List Table (for better back-compat). 2022-05-20 13:44:50 +00:00
barryhughes 77197d3f85 Retain state when filtering. 2022-05-20 13:44:49 +00:00
barryhughes aaefb3b5d5 Per existing order admin list, hide various columns by default. 2022-05-20 13:44:49 +00:00
barryhughes a954aae826 Utilize existing CSS, class-names, JS. 2022-05-20 13:44:49 +00:00
barryhughes 11c2e0c061 Table pagination. 2022-05-20 13:44:49 +00:00
barryhughes 0eabe18b79 Add (dates, customers) filters. 2022-05-20 13:44:49 +00:00
barryhughes 8d44bfb9eb Add bulk actions dropdown. 2022-05-20 13:44:49 +00:00
barryhughes bde166db3d Add table views. 2022-05-20 13:44:49 +00:00
barryhughes e07b0a3b10 Address and reduce code duplication across list table implementations. 2022-05-20 13:44:49 +00:00
barryhughes f95834f095 Create a baseline admin list table implementation that is data-store agnostic. 2022-05-20 13:44:49 +00:00
vedanshujain e3d0de1065 Removed unused import. 2022-05-20 16:36:56 +05:30
vedanshujain ef03e5e0dd Add changelog. 2022-05-20 16:34:51 +05:30
vedanshujain b9f1a05c85 Add methods and fixes that were removed due to merge conflicts. 2022-05-20 15:42:38 +05:30
vedanshujain 781f97242d Remove back-compat support for _date_paid and _date_complete as it conflicts with verify data logic. 2022-05-20 15:41:02 +05:30
Rodel 4da670cc82 Add patch changelog to ignore e2e changes 2022-05-20 16:16:55 +08:00
Rodel 32604a0acc Update html output folder location 2022-05-20 16:02:43 +08:00
Rodel 3a6a546daa Update base url in playwright config 2022-05-20 15:58:54 +08:00
Néstor Soriano 4f76d76d1f
Add changelog file. 2022-05-20 09:55:58 +02:00
Rodel 381c5507da Add allure-playwright config 2022-05-20 15:33:42 +08:00
Rodel 7b66d06c91 Checkout e2e folder from add/playwright-e2e branch 2022-05-20 15:30:28 +08:00
Rodel f79c684c4b Install allure-playwright dependency 2022-05-20 15:26:48 +08:00
Rodel 0429f2abfc Install @woocommerce/woocommerce-rest-api dependency 2022-05-20 15:26:19 +08:00
Rodel 29afe4971e Install playwright dependency 2022-05-20 15:24:46 +08:00
Rodel 86d604756c Checkout .eslintrc.js from add/playwright-e2e 2022-05-20 15:16:50 +08:00
Nestor Soriano 59a6a54891
Add changelog file for #33034 2022-05-20 09:09:14 +02:00
Rodel 99796df9d4 Ignore Allure directories globally 2022-05-20 15:08:01 +08:00
Vedanshu Jain c771121459
Merge pull request #33034 from woocommerce/add/logging_for_posts_to_cot_migration
[COT] Log errors during the posts to orders table migrations
2022-05-20 12:32:00 +05:30
Paul Sealock 71252cac9b changelog 2022-05-20 14:16:06 +12:00
Moon 0b35ad678d
Merge pull request #33027 from woocommerce/update/update-history-package
Update history package to the latest 5.3.0 version
2022-05-19 18:27:12 -07:00
Paul Sealock 7cfdbe4922 add get-schema 2022-05-20 11:48:27 +12:00
Joel T 9e62fb58b8 Updating references to old album-1 image 2022-05-19 16:05:23 -07:00
Paul Sealock 373ad382b5
Analyzer CLI: Refactor main file (#33081) 2022-05-20 10:02:40 +12:00
moon 29fcbfaf68 Fix the failing test 2022-05-19 15:02:04 -07:00
Barry Hughes e62a338826
Merge pull request #31417 from woocommerce/fix/add_filter_to_wc_create_refund
Introduce a filter to control whether an order is partially refunded in `wc_create_refund`
2022-05-19 12:18:11 -07:00
barryhughes 277e3635ab Update @version to 6.7.0. 2022-05-19 18:36:29 +00:00
Jorge A. Torres f64dc181fd
Merge pull request #32953 from Pross/patch-1
Make sure variable is set in `system_status` endpoint.
2022-05-19 17:43:56 +01:00
Sonhui 1376f8acda
Hide post code for Belize, and make state optional (#32731) 2022-05-19 16:01:24 +01:00
“Chris d569cf463a Add docblock 2022-05-19 17:41:09 +03:00
Jorge A. Torres d2d8efa7fc
Merge pull request #32857 from woocommerce/cot/backfill
Implement backfill for update posts records from COT
2022-05-19 15:00:15 +01:00
Adrian Duffell d1fdc2aecc
Update Icon for TikTok for WooCommerce extension (#33112)
* Add tiktok onboarding icon

* Change tiktok extension icon to normal logo

* Remove tiktok for business icon

* Add changelog
2022-05-19 20:00:35 +08:00
Nestor Soriano 71e0fd92d6
Move the base table migration classes outside CustomOrderTable directory
These classes are generic and don't depend on the custom orders table
functionality, so they are moved from src/Database/Migrations/CustomOrderTable
to just src/Database/Migrations.
2022-05-19 10:26:59 +02:00
Nestor Soriano 469c5a1aea
Change references to "orders" to "entities" in generic table migrators 2022-05-19 09:48:04 +02:00
Nestor Soriano c4b498d13f
Remove the MigrationErrorLogger class as it's not used. 2022-05-19 09:43:41 +02:00
Nestor Soriano 9e42028c98
Add changelog file 2022-05-19 09:20:10 +02:00
Nestor Soriano dbbef8ff8a
Move the DatabaseUtil class to the proper directory
The class is in the Automattic\WooCommerce\Internal\Utilities namespace,
but it was wrongly placed in the src/Utilities directory. It has been
moved to usr/Internal/Utilities without changing the namespace, thus
no code changes are required.
2022-05-19 09:12:51 +02:00
Vedanshu Jain 5ab229d217
Merge pull request #32957 from woocommerce/add/experiment-subscriptions-admin-menu-1 2022-05-19 08:32:15 +05:30
James Allan 3cecb3d72c Introduce susbcriptions menu item slug constant 2022-05-19 11:14:32 +10:00
James Allan 3aa2294968 Use date created and status order filter for order eligiblity check
Using these two order properties instead of the paid_date field is more performance friendly
as both fields are in the wp-posts table - not in the post_meta table.

ref: 71e9657e52 (r875545984)
2022-05-19 10:42:53 +10:00
Chris Aprea 98e23a8156 Only add the inline script if the store is eligible for the experiment 2022-05-19 10:11:27 +10:00
Moon 9b7bf2cf16
Merge pull request #32974 from woocommerce/update/32410-deprecated-wca-classes-have-wca-versions
Use the core version for the @deprecated tags in WCA
2022-05-18 16:11:10 -07:00
Barry Hughes 2b6097535b
Merge pull request #33091 from DavidAnderson684/patch-8
Check results of calling WP_Filesystem()
2022-05-18 15:07:43 -07:00
barryhughes a642db3d41 Add changelog. 2022-05-18 21:38:34 +00:00
David Anderson dbd3c71ee8
Update plugins/woocommerce/includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-05-18 21:22:13 +00:00
barryhughes a1279e67c6 Switch to cast to coerce values into floats. 2022-05-18 20:43:38 +00:00
Barry Hughes 1ce91eb70f
Merge pull request #33078 from woocommerce/add/pay-for-order-express-checkout-action
Adding the action to the Pay for Order shortcode
2022-05-18 11:46:35 -07:00
Radoslav Georgiev 303e7e27a1 Adding available_gateways to the filter 2022-05-18 20:57:00 +03:00
Radoslav Georgiev 1c813ea3fb Adding a docblock to the order button filter as well 2022-05-18 18:16:25 +03:00
Radoslav Georgiev f73cbb6671 Adding a @since to the docblock comment. 2022-05-18 18:05:27 +03:00
David Anderson 01b248c8df
Check results of calling WP_Filesystem() 2022-05-18 10:36:48 +00:00
Ilyas Foo 045b9e6cf3
Fix nested link in products import task (#33088)
* Fix nested links by using onClick event instead

* Changelog
2022-05-18 17:57:25 +08:00
vedanshujain 7ff0ba8061 Applied coding standards. 2022-05-18 13:24:42 +05:30
RJ f637dd2bb7
Add: temporary workaround to add experiment metadata for task_view (#33052)
rigged a workaround to let products task report its experimental assignment
2022-05-18 15:24:48 +08:00
RJ 31922c1da9
Merge pull request #33083 from woocommerce/fix/broken-events-tracking-assignment-to-const
fix: broken event tracking due to assignment to const
2022-05-18 11:16:02 +08:00
Chi-Hsuan Huang 9a15f68f3f
Merge pull request #33068 from woocommerce/update/33062-subscriptions-product-type-only-in-the-us
Update add product task to only show "subscriptions" product type for stores in the US
2022-05-18 11:12:52 +08:00
RJChow b8bd4bb5ca fix: broken event tracking due to assignment to const 2022-05-18 10:28:27 +08:00
Chi-Hsuan Huang 3ba19b3ab5 Add changelog 2022-05-18 10:21:49 +08:00
Chi-Hsuan Huang 1a87301894 Fix payment settings banner tos link 2022-05-18 10:21:29 +08:00
Chi-Hsuan Huang c551477248 Hide subscription product type when store country is unknown 2022-05-18 10:18:57 +08:00
Chi-Hsuan Huang 103afc0c6d Add changelog 2022-05-18 10:15:45 +08:00
Chi-Hsuan Huang 017d8c2a80 Update product task to only show subscription product type for merchants in the US 2022-05-18 10:15:44 +08:00
Chi-Hsuan Huang 657e40ed98 Convert getProductTypes method to use object param 2022-05-18 10:15:17 +08:00
Chi-Hsuan Huang c8146d6c5d
Merge pull request #33071 from woocommerce/fix/33055-skip-payment-welcome-screen-for-wcpay-setup
Skip payment welcome screen for WCPay banner experiment
2022-05-18 10:07:00 +08:00
Chi-Hsuan Huang dc9b545a30
Merge pull request #33058 from woocommerce/add/view-more-product-type-track
Add view more product type click event track for the add product task
2022-05-18 09:51:49 +08:00
Chi-Hsuan Huang 29fe251bb1
Merge pull request #33030 from woocommerce/update/system-status-report
Report the status of admin items in SSR
2022-05-18 09:50:27 +08:00
James Allan 71e9657e52 Fix typo 2022-05-18 11:21:41 +10:00
James Allan 91669281ec Rename component class names with BEM standard names 2022-05-18 10:56:06 +10:00
Chris Aprea 0cd63cf130 Only register the the subscriptions page if tracking is allowed 2022-05-18 09:21:39 +10:00
Moon d066266fbf
Merge pull request #33023 from woocommerce/update/33022-update-explat-with-examples
Update ExPlat with more examples
2022-05-17 16:20:09 -07:00
louwie17 e822a4a7f4
Merge pull request #32538 from woocommerce/feature/32158_complete_task_list_card_with_feedback
Feature/32158 complete task list card with feedback
2022-05-17 17:39:14 -03:00
Radoslav Georgiev 2ae5d90088 Adding the changelog entry 2022-05-17 20:32:04 +03:00
Lourens Schep 23d64d0bc2 Rename showCustomerEffortScore prop 2022-05-17 14:25:06 -03:00
Radoslav Georgiev 3cb59ebc8f Adding the action to the Pay for Order shortcode 2022-05-17 20:24:24 +03:00
Joshua T Flowers 07b02fb858
Add filtered tracks properties to client-side tracks (#32690)
* Add filtered tracks properties to client-side tracks

* Add changelog entry

* Fix up tracks errors

* Update vars to const
2022-05-17 13:12:52 -04:00
Joshua T Flowers 0702433531
Add tracks to products list page (#32949)
* Add tracks to products list page

* Remove duplicate tracks

* Add changelog entry

* Check for fields before getting values

* Add bulk actions cancel button

* Check for element before binding event listener

* Check for search input before getting value
2022-05-17 11:52:44 -04:00
vedanshujain 2ca4b42846 Modify tests to skip reading meta_ids 2022-05-17 20:12:47 +05:30
vedanshujain ad30c61463 Multiple fixes for reading order data.
Some meta items cause issues when testing, such as having trailing zeros. This commit fixes, along with adding compatibility with WC < 2.6.
2022-05-17 20:10:40 +05:30
Lourens Schep 5494f4970d Renamed some of the variables to remove some ambiguity 2022-05-17 09:59:11 -03:00
Vedanshu Jain 58eaa73d39
Merge pull request #33051 from woocommerce/pr/32980
From PR 32980, Update IN PIN Code
2022-05-17 17:28:35 +05:30
vedanshujain 37a41423fe Add changelog. 2022-05-17 16:48:03 +05:30
vedanshujain 253e8424ea Add backfill method to support update post and postmeta data. 2022-05-17 16:47:59 +05:30
vedanshujain 22f81c9693 Add test for backfill from COT to wp_post and wp_postmeta. 2022-05-17 16:47:17 +05:30
Chi-Hsuan Huang 27ed682980 Add changelog 2022-05-17 17:40:59 +08:00
Chi-Hsuan Huang d4af17d3a3 Skip payment welcome screen for wc pay banner experiment 2022-05-17 17:40:59 +08:00
RJ b524b82816
Merge pull request #33047 from woocommerce/fix/wrap-import-products-under-experiment
Wrap product task import around experiment
2022-05-17 14:57:29 +08:00
vedanshujain ea1594bab9 Add changelog. 2022-05-17 11:40:49 +05:30
Chi-Hsuan Huang 902dcf3369 Check if woocommerce_admin_install_timestamp > 0 for SSR & remove extra space 2022-05-17 14:07:39 +08:00
Chi-Hsuan Huang 9bddfbb84e Add changelog 2022-05-17 13:58:33 +08:00
Chi-Hsuan Huang c4c1cc4da7 Add admin items to system status report 2022-05-17 13:58:33 +08:00