Commit Graph

9368 Commits

Author SHA1 Message Date
Maikel David Pérez Gómez 3ded2b46e9
Create editor skeleton on add/edit product pages (#37023)
* Add required dependencies

* Create the block editor component

* Create the header component

* Create the sidebar component

* Create the editor component

* Remove comments

* Export the block editor from its package

* Enqueue wp-edit-site

* Create the new block mode product page

* Register the new ProductPage component in /add-product route

* Add temporal layout styles

* Fix rebasing conflicts

* Fix linter errors

* Redirect to the new product-editor page when edit

* Add changelog files

* Fixing dependencies conflicts and ignoring some non running test

* Add comment suggestions

* Fix conflicts after rebasing

* Add comment suggestions
2023-03-08 05:51:59 -04:00
rodelgc b60cc128fd
Allow running of "Smoke test release" on draft releases (#36997)
* Conditionally use authorization token when getting WC Zip download URL.

* Exponse error message

* Handle undefined authorization token more gracefully

* Specify GH token in workflow

* Add changelog

* Use E2E_GH_TOKEN instead of default github.token

* Provide GitHub token to other jobs

* Fix getting of tag name from triggered event

* Use "inputs" context instead

* Add release version to workflow name

* Correct concurrency group

* Fix workflow name

* Add --archive option

* Fix output setting

* Fix script for verifying asset

* Remove unnecessary 'uses' line

* Remove node 12 deprecation messages

* Re-add "published" release type
2023-03-08 10:23:56 +01:00
Tomek Wytrębowicz dbc3cde987
Remove redundant code from Report classes (#36883) 2023-03-08 08:46:08 +01:00
Fernando Marichal a23b2cf415
Fix duplicated global attribute (#37109)
* Add fix

* Add changelog

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-03-07 18:04:17 -03:00
Gan Eng Chin 97ed1d2a7d
Fix array length rendering literal 0 in CreateNewCampaignModal. 2023-03-08 02:57:02 +08:00
Néstor Soriano 8786c19b74
Fix: variations exported as draft were imported as draft (#36933)
* Fix: variations exported as draft were imported as draft

* Add changelog file

* Fix "ArrayUtil::get_value_or_default" for existing keys with null values

Now ArrayUtil::get_value_or_default($array, $key, $default) will return
null, instead of $default, when $array[$key] exists and is null.

* Undo the change to ArrayUtil (will get its own PR)
2023-03-07 13:57:17 -03:00
Rodrigue Tusse 6f8f35b9f1 Add changelog. 2023-03-07 15:15:35 +02:00
Rodrigue Tusse ed6c19b827 Fix 0 rendered on short-circuit evaluation. 2023-03-07 15:06:25 +02:00
Viktor Szépe f1a3f388bd
Fix variable name in Reports\Stock\Stats (#37057)
* Fix variable name in Reports\Stock\Stats

* Add since tag

* Add changelog
2023-03-07 09:44:51 +08:00
github-actions[bot] e8b8c058b0
Delete changelog files based on PR 37051 (#37093)
Delete changelog files for 37051

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-03-07 12:52:05 +13:00
Niels Lange 9218bfd237
Bump WooCommerce blocks package to 9.6.5 (#37051)
---------

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2023-03-07 12:25:22 +13:00
Corey McKrill d2e1ff4333
Add unit test 2023-03-06 15:07:19 -08:00
Corey McKrill 0c9bd08ed6
Tweak the input value for date_modified
Turns out the value used here doesn't matter, because it will always
update to the current time. It just needs to have a changed prop in
order for the save to execute.
2023-03-06 15:05:41 -08:00
Joel Thiessen 2332c7c813
Migrating details fields to product-editor package (#36945) 2023-03-06 14:33:10 -08:00
Maikel David Pérez Gómez 79841c58a5
Fixes react version to 17.0.2 globally (#37087)
* Fix react version to 17.0.2 globally

* Add changelog file
2023-03-06 18:38:05 -03:00
Ron Rennick a78fe23e61
Fix Typo in Variable Name on line 342 (#36759) 2023-03-06 14:09:58 -04:00
Ron Rennick 7d62529dd4
Allows developers to add their own filters to the active filters list (#36705) 2023-03-06 13:18:04 -04:00
Joel Thiessen b825b51767
Moving useProductHelper and useVariationsOrder hooks to product editor package (#37006) 2023-03-06 09:11:54 -08:00
Ron Rennick 5586fb96ba
Add changelog file 2023-03-06 13:09:14 -04:00
Ron Rennick c67ccf6492
Move the changelog to the correct folder 2023-03-06 10:49:21 -04:00
Viktor Szépe deb1d131ad
Fix absolute imports (#37058)
* Fix absolute imports

* Add changelog

* Fix changelog
2023-03-06 19:38:52 +08:00
Viktor Szépe 50fe847b56
Fix class namespaces in Onboarding (#37056)
* Fix class namespaces in Onboarding

* Add changelog
2023-03-06 19:33:23 +08:00
Marco Almeida 4b9be76926
Add @since tag to hooks doc 2023-03-06 09:55:22 +00:00
Nathan Silveira a39abbb15e
Fix jQuery event being erased when element was replaced after saving attributes (#37019)
Attach create_variations event to parent to avoid erasing it when DOM element is replaced
2023-03-03 14:34:07 -03:00
Gan Eng Chin e653a4ca15
Merge branch 'trunk' into feature/34909-marketing-create-campaign-modal 2023-03-04 01:04:59 +08:00
Gan Eng Chin 3e620c41c6
Add tests for CreateNewCampaignModal. 2023-03-04 01:02:46 +08:00
Joel Thiessen 36655cb1e4
Updating rest namespace for product post type to v3 (#37028) 2023-03-03 08:30:56 -08:00
Barry Hughes 6f3858e82d
Fix class name in ProductDownloadsServiceProvider (#37052) 2023-03-03 08:11:55 -08:00
Barry Hughes 4316a6629d
Add changelog file 2023-03-03 07:25:02 -08:00
rodelgc 46300131ff
Correct `UPDATE_WC` value in the "Smoke test daily" workflow (#37049)
* Correct UPDATE_WC value

* Add changelog
2023-03-03 13:58:21 +01:00
Albert Juhé Lluveras 46aa035e14
Fix missing padding in some buttons in TT2 with WP 5.9 and 6.0 (#37018)
* Add default button padding to TT2 stylesheet to fix some visual issues in WP 5.9 and 6.0

* Add changelog notice
2023-03-03 13:45:18 +01:00
Viktor Szépe 7ec2ad68be
Fix class name in ProductDownloadsServiceProvider 2023-03-03 13:43:06 +01:00
Gan Eng Chin 00a12db5bd
Add Campaigns card in Multichannel Marketing page (#36735) 2023-03-03 18:43:02 +08:00
Marco Almeida 987b4feb24
Add params and docblocks to the new hooks
Add params and docblocks to the new proposed hooks woocommerce_widget_layered_nav_filters_start and woocommerce_widget_layered_nav_filters_end
2023-03-03 10:13:13 +00:00
Corey McKrill ceeb5a8f4a
Add changelog file 2023-03-02 16:04:30 -08:00
Corey McKrill 1fde589c9f
Orders: Update date modified on refund
Ensures that when a refund is processed successfully for an order,
the date_modified field for the order is updated to match the creation
date of the refund.

Refs #28969
2023-03-02 16:00:27 -08:00
Gan Eng Chin 15c57bf712
Fix and add tests for Campaigns card. 2023-03-03 03:25:00 +08:00
Gan Eng Chin 34ebedd7f6
Add changelog. 2023-03-03 03:01:55 +08:00
Gan Eng Chin 913f7176b2
Refetch registered channels after installing channel in Campaigns card. 2023-03-03 02:34:16 +08:00
Ron Rennick 3cee72119a
Prevent possible warning in `COTMigrationUtil::get_post_or_object_meta()` (#37026) 2023-03-02 14:05:24 -04:00
Gan Eng Chin ec15697d44
Load campaign types in Campaigns card. 2023-03-03 01:08:21 +08:00
Gan Eng Chin e13112875b
Move useNewCampaignTypes to shared hooks directory. 2023-03-03 01:05:14 +08:00
Gan Eng Chin 51a5a18448
Simplify receiveCampaignTypes. 2023-03-03 00:54:21 +08:00
Gan Eng Chin 8132addd18
Simplify wp.data for receiveCampaignTypes. 2023-03-03 00:24:51 +08:00
Gan Eng Chin 2443bfd7a0
Merge branch 'feature/34905-marketing-campaigns-card' into feature/34909-marketing-create-campaign-modal
Conflicts:
	plugins/woocommerce-admin/client/marketing/data-multichannel/action-types.ts
	plugins/woocommerce-admin/client/marketing/data-multichannel/actions.ts
	plugins/woocommerce-admin/client/marketing/data-multichannel/resolvers.ts
2023-03-03 00:11:35 +08:00
Saad Tarhi dfc1535786
Add support for the Cart & Checkout in WooCommerce's declare compatibility feature (#36426) 2023-03-02 16:51:30 +01:00
Saad Tarhi e6bee7b785 Apply disable UI filter to experimental features too
This change disable UI for both experimental and mature features

Previously we applied this filter to mature ones only
2023-03-02 10:39:33 +01:00
Sam Seay 1834621d1a
Update the @woocommerce/eslint-plugin and fix bugs (#36988) 2023-03-02 11:36:38 +13:00
Jorge A. Torres 7c7611856b Add changelog 2023-03-01 18:44:55 -03:00
Jorge A. Torres 77c87bc516 Check that $post->ID exists before using in COTMigrationUtil::get_post_or_object_meta() 2023-03-01 18:44:26 -03:00
Moon d339a777e1
Update/use theme color for completed task strikethrough (#37001)
* Use theme color for completed task strikethrough

* Add changelog

* Fix style
2023-03-01 11:54:21 -08:00
Gan Eng Chin c0364ad0ab
Remove unused error property in CampaignsState. 2023-03-02 03:16:29 +08:00
Gan Eng Chin 4b87f0a4ed
Add JSDOC. 2023-03-02 03:15:38 +08:00
Gan Eng Chin 9feaf55a60
Simplify receive campaigns success and error. 2023-03-02 03:02:14 +08:00
Gan Eng Chin 5af90c5e77
Add JSDOC for getTotalFromResponse. 2023-03-02 01:16:51 +08:00
Gan Eng Chin b83888577a
Fix getTotalFromResponse treating total 0 as undefined.
If total is 0, then the function should return 0, not undefined.
2023-03-02 01:13:42 +08:00
Gan Eng Chin 8e9f344478
Test code refactor with createTestCampaign. 2023-03-02 00:59:22 +08:00
Justin Palmer f0c2df54f5
Add marketplace suggestions + multichannel marketing info to WC Tracker 2023-03-01 17:00:17 +01:00
Fernando Marichal 25497c4faa
Add existing global attribute layout (#36944)
* Changed `has_local_attributes`

* Add new layout

* Add attribute layout

* Add changelog

* Create method `toggle_add_global_attribute_layout`

* Add global attribute layout

* Fix button in mobile

* Remove commented code

* Change changelog

* Fix typo

* Fix style

* Fix buttons visibility

* Fix div visibility

* Fix buttons visibility

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-03-01 11:56:49 -03:00
Nathan Silveira 2e33922e35
Change Variations form shown in Variations tab when there are no variations created (#36957)
* Show add attribute in Variations tab

* Create new ajax function to create attributes and variations at the same time

* Partial commit for review

* Rename action and reload attributes and variations screen after submitting action

* block/unblock UI when loading

* Change labels

* Remove unneeded output_variations function

* Changelog

* Extract duplicated code to html-product-attribute-inner

* Handle sniff issues

* Fix PHPCS issues

* Refactor class-wc-ajax to reuse code

* Fix phpcs issues

* Fix more sniff issues

* Handle code review suggestions

* Switch back to var

* Switch to snake case

* Use var instead of const
2023-03-01 09:12:30 -03:00
Chi-Hsuan Huang 4b1bcad3ba
Fix blank screen is displayed during OBW when using WP5.9 (#36903) 2023-03-01 09:42:11 +08:00
jonathansadowski bd6586a378
Update the stable tag to 7.4.1 (#37009)
* Update the stable tag to 7.4.1

* Create change file
2023-02-28 16:56:32 -06:00
Jorge A. Torres d1f1f91409
[36257 redux] Add `menu_order` sorting option to products widget (#37002)
* Update class-wc-widget-products.php

Option for default sorting by menu order

* Fix PHPCS issues

* Add changelog

---------

Co-authored-by: 2GOOD <2GOOD@users.noreply.github.com>
2023-02-28 16:00:43 -03:00
HILAYTRIVEDI 91b9aef4db
fix/#34200-need-to-add-space-between-author-image-and-meta (#34994)
* fix/#34200-need-to-add-space-between-author-image-and-meta

* Log added

* Log added

* fix/#34200-need-to-add-space-between-author-image-and-meta

* Remove unnecessary changelog file

* Reword changelog

* Further adjust CSS to match Comments table

* Add missing <br> to match other comments tables

* Reindent some CSS lines

---------

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-02-28 15:12:58 -03:00
Maikel David Pérez Gómez 7d0669dcb1
Add selection to the tree control (#36435)
* Create tree-control component

* Remove items from treeItemProps

* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add stories

* Add the type definitions

* Add use selection hook

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add selection logic to the tree control

* Create stories

* Add changelog file

* Fix linter error

* Add styles to fit the disign

* Highlight selected item when it's a single selection tree

* Rebasing from trunk

* Add comment suggestions

* Fix unit test errors due to a new version of @wordpress/compose related to the ResizeObserve feat
2023-02-28 15:10:12 -03:00
Joel Thiessen 6a345ac7eb
Moving currencyContext to currency package and updating references (#36959) 2023-02-28 08:55:49 -08:00
Saad Tarhi 6b099f917b
Bump WooCommerce blocks package to 9.6.3 (#36992) 2023-02-28 12:13:20 +01:00
Saad Tarhi ac47d1892e Add changelog 2023-02-28 07:46:25 +01:00
Saad Tarhi 42d75e5529 Run "composer update woocommerce/woocommerce-blocks" 2023-02-28 07:44:18 +01:00
Saad Tarhi 3992e25d7a Bump Woo Blocks version to 9.6.3 2023-02-28 07:43:48 +01:00
Corey McKrill 2700a44463
Fix: can't apply or remove a coupon whose code is "0". (#36924)
Fixes a bug that allowed to create a coupon with code "0" but prevented if from being actually used. With the fix a coupon with code "0" can be used as any other coupon.

Also adds two new methods to the StringUtil class: `is_null_or_empty` and `is_null_or_whitespace`.

Closes #35210.
2023-02-27 12:17:34 -08:00
Gan Eng Chin d111370d1e
Make UI work with wp.data new campaign types. 2023-02-28 00:51:34 +08:00
Gan Eng Chin 9526608fbc
wp.data for getting new campaign types. 2023-02-28 00:45:47 +08:00
Gan Eng Chin 418e4fba02
Fix build error after merging. 2023-02-27 23:49:50 +08:00
Gan Eng Chin f420a0ed9e
Merge branch 'feature/34905-marketing-campaigns-card' into feature/34909-marketing-create-campaign-modal
Conflicts:
	plugins/woocommerce-admin/client/marketing/components/RecommendedChannelsList.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.scss
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/Channels.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/RecommendedChannels.tsx
2023-02-27 23:46:30 +08:00
Nestor Soriano be43265761
Fix GET coupons request and apply_coupon 2023-02-27 10:15:56 +01:00
Ron Rennick a45f9c4f55
Fix k6 baseline load imports (#36940)
* add wpLogin import to wc-baseline-load.js

* add changelog

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-02-27 16:42:10 +08:00
Nestor Soriano f56010334d
Remove unnecessary 'use's 2023-02-27 09:28:15 +01:00
Corey McKrill 3f0405970d
Product Importer: Ensure all products in the file get processed (#36839) 2023-02-27 08:47:31 +01:00
rodelgc ea1925c841
Enable "Smoke test release" workflow (#36598)
* First pass at updating release test workflow

* Add changelog

* Set dir env variables

* Update to workflow

* Fix indent

* Fix indent

* Clean up indent

* Re-order steps

* Change order of jobs

* Added common php versions

* Update pipeline

* Update some labels

* Simplify for testing

* Update paths

* Create tmp folder

* Fix path

* Paths

* Try outputting some debugging

* Add step ID back

* Remove working directory

* Another path tweak

* Add API release tests

* Add k6 tests

* Add PHP tests

* Launch wp-env during PHP tests

* Try default values

* Tweak some settings, add WP testing

* Tweak some settings

* Re-order e2e steps

* Update step descriptions

* Reorganize tests, add plugin tests

* Enable only e2e job

* Initial set up to run against release smoke test site

* Fix syntax

* Temporarily disable update wc spec

* Temporarily disable downloading woocommerce zip

* Download release zip using tag name

* Fix wrong job name

* Fix wrong job name

* Fix dir

* Delete fetch-asset-id.js

* REfactor update-woocommerce spec

* Add error handling

* Download release zip by tag

* Refactor update woo spec to download zip by tag

* Correct job name

* fail test on invalid tag

* Enable all e2e tests

* Run api tests before e2e tests

* Fix job dependency

* Add customer credentials to api job

* Separate job for WC Update

* Combine e2e allure-results, then report

* Enable report job

* Fix context

* Change job and artifact names

* Use test s3 path

* Minor job name change

* Upload artifacts to bucket

* Correct s3 path

* Add quiet option

* Retain video on failures

* Finalize s3 path

* Try WP latest-1

* Revert to wp latest

* Refine search for woocommerce zip asset

* Get created-at

* Specify repo in gh command

* Slugify env description

* Trim space

* Sync with bucket instead of copy

* Remove invalid --recursive flag

* Re-add missing step to combine e2e results from update wc test

* Ensure artifact upload on test failure

* Enable all e2e tests on WP latest

* Retain existing data before updating WC

* Make test compatible with 'Canceled' and 'Cancelled'

* Set env_desc as env var

* Re-add deleted file

* Fix UPDATE_WC in daily smoke test workflow

* Add tracing in global setup

* Remove tracing

* Temporarily run only basic spec

* Job for WP Latest-1 & 2

* Fix "Required input 'created_at' not provided"

* Minor rename

* Remove install filter

* Install deps in get-wp-matrix

* Delete get-wp-versions.js

* Add get-wp-versions.js to e2e-pw folder

* REname file

* REfactor

* Refactor script for getting WP prev versions

* Update job dependencies

* Temporarily remove disabled jobs

* Allow e2e-wp-latest after api test failure

* Update L-1 & L-2 job deps

* Fix report-wp-latest

* Fix failing api test

* Make get-wp-versions quicker

* Publish report immediately after test

* Test reporting in e2e-update-wc

* Fix missing parameter

* Fix env_desc, re-enable other jobs

* Enable all e2e tests

* Minor job name change

* Fix flaky test

* Add php version testing

* stringify php versions

* Re-enable all e2e tests

* Up timeout to 2min

* Remove PHP 8.0

* Add missing conditionals

* Fix php version verification script

* Fix starting dir

* Fix flakiness

* Skip e2e if api failed

* Verify woocommerce.zip early

* Add token

* Delete test summary on github for the meantime

* Use default playwright config

* More meaningful variable names

* Update step titles based on review

* Use expect.poll()

* Minor spacing corrections

* Use `stable-check` endpoint, delete unnecessary loop

* Update locators to be JN-compatible

* Fix erroneous getting of release tag

* Fix conflict of "No thanks" button locator with that of WP Mail Logging's

* Update github-script action to v6

* Revert to 'Cancelled'

* Remove unnecessary step

* Provide missing env variables

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
2023-02-27 12:11:46 +08:00
Gan Eng Chin e57181b987
Add tests for Campaigns component. 2023-02-27 02:23:11 +08:00
Gan Eng Chin 3513ef51a1
Merge branch 'trunk' into feature/34905-marketing-campaigns-card 2023-02-25 00:39:37 +08:00
Barry Hughes 6cd66c5692
Merge branch 'trunk' into add/encoding-selector-to-product-importer 2023-02-24 08:13:15 -08:00
Gan Eng Chin f62b44ae2f
Set numberOfRows for TablePlaceholder in Campaigns card. 2023-02-24 23:48:04 +08:00
Gan Eng Chin f7a1ef2123
Code refactor with getTotalFromResponse in getCampaigns. 2023-02-24 23:45:10 +08:00
Gan Eng Chin a4e11924fd
Change meta.total to optional in receiveCampaignsSuccess. 2023-02-24 23:44:47 +08:00
Gan Eng Chin f5ba6d94ac
Remove unused fetchWithHeaders control. 2023-02-24 23:35:40 +08:00
barryhughes c8074a79e5 Add changelog 2023-02-24 06:35:56 -08:00
barryhughes b772e9a995 Merge branch 'trunk' into issues/35004-attributes-saved-trigger 2023-02-24 06:31:31 -08:00
Néstor Soriano 89ec0bc083
Change SORT_STRING to SORT_NATURAL for the encodings list
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2023-02-24 14:59:08 +01:00
louwie17 aec4dfd3bd
Update product editor package (#36830)
* Add missing dev packages to product-editor package

* Create components folder for organization

* Move product field, section and tab slots over to product-editor package

* Move use of product slot fills to product-editor package

* Sync dependencies

* Add changelogs

* Update README's and add constant for default values

* Update README's in product-editor package
2023-02-24 09:37:53 -04:00
Nestor Soriano 575146615a
Fix: can't apply or remove a coupon whose code is "0" via REST api
Also fix: coupon usage not incremented for coupon with code "0"
2023-02-24 11:57:23 +01:00
Gan Eng Chin a982b7be21
Error handling in getCampaigns. 2023-02-24 18:32:33 +08:00
Gan Eng Chin 92762ca9b0
Better pagination with TablePlaceholder in Campaigns card. 2023-02-24 17:09:42 +08:00
louwie17 2ef4f8a9da
Fix create wc extension script (#36917)
* Run create-extension for create-wc-extension script

* Add changelog

---------

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2023-02-24 04:28:07 -04:00
helgatheviking e0cf5476a8 Add woocommerce_attributes_saved trigger. Closes #35004. 2023-02-23 16:35:02 -07:00
Fernando Marichal 756fe32c04
Create spotlight on analytics revenue report (#36653)
* Add `RevenueReportDateTour` component

* Add changelog

* Fix styles

* Rename RevenueReportDateTour to ReportDateTour to use it in two different reports: Orders and Revenue

* Change default sort date to date_paid

# Conflicts:
#	plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php

* Update changelog

* Assign date_column_name before calling parent constructor

* Remove date_type default value from configuration and show tour only if user didn't assign a value

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Nathan Schneider <nsschneider1@gmail.com>
2023-02-23 15:49:24 -03:00
Gan Eng Chin 61aa3cd135
Add changelog. 2023-02-24 02:19:46 +08:00
Gan Eng Chin cc5345db4e
Campaigns pagination UI logic. 2023-02-24 02:13:20 +08:00
Gan Eng Chin 60d815c582
wp.data for campaigns data pagination. 2023-02-24 02:10:37 +08:00