Commit Graph

50879 Commits

Author SHA1 Message Date
Joshua T Flowers 31ec8d8352
Add tab blocks to the blocks product editor (#37174)
* Add initial tab block and tabs render

* Add tabs styling

* Set initially selected tab on render

* Set initial tab based on query param

* Add template placeholder with tabs

* Add changelog entry

* Allow multiple tab and section blocks

* Add changelog entry for wc

* Fix up arrow alignment

* Fix up block configuration type

* Add missing navigation dependency to product editor
2023-03-13 15:00:50 -07:00
Fernando Marichal b1a0d3177c
Show message in Inventory tab for variable products (#37185)
* Add message to inventory tab

* Add styles

* Add changelog

* Fix link styles

* Fix message style without buttons

* Avoid line break

* Remove space

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-03-13 18:26:51 -03:00
Joshua T Flowers 2b4ed6fe03
Add section block for use in product editor (#37153)
* Allow json imports in product editor package

* Add section block

* Init all blocks in product editor

* Add section styles and base product editor font styles

* Add changelog entry

* Handle PR feedback
2023-03-13 11:38:16 -07:00
Joel Thiessen 4dff6db40f
Adding test name block with support for entity data store (#37132)
* Adding test name block with support for entity data store

* Adding changelog

* Changing block.ts to block.json and amending TS config to support

* Experiment in loading blocks from settings template

* Enable the use of templates with the block editor

* Fix dependency

* Add changelog

* Fix lint error and remove unused utils

* Fix tests by fixing mocks

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-13 11:45:25 -03:00
Gan Eng Chin 7bf2cedc5c
Add "Create a new campaign" modal (#37044) 2023-03-13 13:24:47 +08:00
Gan Eng Chin 0cf56774f5
Merge branch 'trunk' into feature/34909-marketing-create-campaign-modal 2023-03-13 12:51:24 +08:00
louwie17 329b0cbd07
Hydrate product editor settings (#37123) 2023-03-10 12:21:22 -08:00
Tam Mullen 5019a344a1
Add k6 release regression test (#37146)
* Added test scenario for release regression testing
2023-03-10 17:47:33 +00:00
Gan Eng Chin c6e6f8774d
Specify empty array dependency in useCampaignTypes.
This is to make it work with WP 5.9. See https://github.com/woocommerce/woocommerce/pull/37044#discussion_r1132062493.
2023-03-11 00:42:09 +08:00
Gan Eng Chin 1fea0185fe
Don't throw error in getCampaignTypes.
In WP 5.9, if we throw error, there would be an uncaught promise, and it causes UI to break.
2023-03-11 00:31:23 +08:00
Matt Sherman af24637439
Create @woocommerce/admin-layout package (#37094)
* Initial admin-layout package skeleton

* Changelog files

* Use createOrderedChildren and sortFillsByOrder from @woocommerce/components for WooFooterItem

* Move WooFooterItem to @woocommerce/admin-layout

* Use WooFooterItem from @woocommerce/admin-layout

* Suppress errant TS lint errors

* Exports for @woocommerce/admin-layout

* Fill updates and eslint suppression

* Changelogs

* Remove suppression of tslint errors

* Fix react and @types/react versions

* Load @woocommerce/admin-layout script and styles

* Move WooHeaderItem, WooHeaderNavigationItem, and WooHeaderPageTitle to @woocommerce/admin-layout

* Regenerate lock file post-rebase

* Remove duplicate import post-rebase

* Add wc-admin-layout to app style dependency

* Fix jest mock of @woocommerce/admin-layout

* Fix spacing.

* Export slot names

* Fix typo in .npmrc

* Update lock file

* Try updating lock file

* Update lock file

* Update lock file

* Update to latest lock file from trunk

* Update lock file

* Sync dependencies of @woocommerce/admin-layout

* Manually sync @wordpress dependencies
2023-03-10 09:58:02 -05:00
Néstor Soriano 4cbb607631
Render 'safe_text' settings as 'text' inputs (#37154) 2023-03-10 10:52:09 +01:00
Matt Sherman 4f5a3d7e77
Show link to store settings when stock management is disabled (#37140)
* Update stock management enabled checkbox label

* Add link to store settings when stock management is disabled

* Refactor to create woocommerce_wp_note function
2023-03-09 22:45:54 -05:00
jonathansadowski 4ebd35b41d
Update automation bypass to work correctly, consider actions bot. (#37045) 2023-03-09 17:10:33 -06:00
Joel Thiessen 970c1ef352
Hydrating product entity when creating or editing product with block editor (#37064) 2023-03-09 13:11:25 -08:00
Jorge A. Torres 9776cad2b7 Render 'safe_text' settings as 'text' inputs. 2023-03-09 17:31:39 -03:00
Maikel David Pérez Gómez 2896a8cd13
Add the new feature to enable the new product editor blocks experience (#37137)
* Add the new feature to enable the new product editor blocks experience

* Add the type definition of the feature flag

* Add the feature to the beta_featues in Features.php file

* Keep the page routes when the feature is anabled

* Add the feature php class to manage page assets

* Add changelog file
2023-03-09 15:33:39 -03:00
Gan Eng Chin 0a58ec19f8
Remove unneeded div in CreateNewCampaignModal. 2023-03-10 02:14:35 +08:00
Gan Eng Chin e4da8cba09
Display info message when there are no campaign types. 2023-03-10 02:13:05 +08:00
Seghir Nadir 46b813723d
Turn WC_Order::get_tax_location public (#36953)
* Make WC_Order::get_tax_location public

* Reverted access modifier change for get_tax_location() and implemented public wrapper get_taxable_location()for it.

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-03-09 16:06:02 +00:00
Gan Eng Chin 6446053784
Load campaign types in overview and refetch after installeing a channel. 2023-03-09 23:46:54 +08:00
Matt Sherman e572134384
Escape backquotes in syncpack pre-push message (#37143) 2023-03-09 09:51:45 -05:00
Gan Eng Chin 8b6aad4138
Refetch campaign types after installing a channel in CreateNewCampaignModal. 2023-03-09 22:51:12 +08:00
Néstor Soriano 73c1ad1541
Fix the ArrayUtil::get_value_or_default method (#37053)
* Fix the ArrayUtil::get_value_or_default method

The method was supposed to return null if the key exists in the array
and has a null value, but instead it was returning the supplied
default value, as the "??" operator.

Also the few existing usages of the method that supplied a default value
have been converted to instances of the "??" operator for compatibility.

* Add changelog file
2023-03-09 11:42:54 -03:00
Gan Eng Chin 29d67a3a21
Refactor test data in CreateNewCampaignModal tests. 2023-03-09 22:31:51 +08:00
Gan Eng Chin 9f0326b398
Remove unneeded return in CreateNewCampaignModal.
This helps us save indentation and make the code few lines shorter.
2023-03-09 22:26:06 +08:00
Gan Eng Chin e15305b7c3
Remove unneeded CardDivider in CreateNewCampaignModal.
The code is copied from the Channels component, but in CreateNewCampaignModal, we don't need to display the divider, so we can just remove the divider code.
2023-03-09 22:23:27 +08:00
Gan Eng Chin c6dcee426b
Make it clear that title and classname cannot be overwritten by props. 2023-03-09 22:17:03 +08:00
Matt Sherman 40f3a7160a
Rename "Manage stock?" label to "Stock management" (#37135) 2023-03-09 09:14:47 -05:00
Gan Eng Chin f5bb8490ea
Rename open and setOpen to isModalOpen and setModalOpen in Campaigns. 2023-03-09 22:11:53 +08:00
Gan Eng Chin e831e89997
Make the mocked modal clearer.
The previous text "Create a new campaign" can be a bit confusing with the other text "Create new campaign" in the test.
2023-03-09 22:09:24 +08:00
Gan Eng Chin 551db21e9b
Remove unneeded getByText in Campaigns test. 2023-03-09 22:05:17 +08:00
Gan Eng Chin f19969dacb
Change NewCampaignTypes to CampaignTypes. 2023-03-09 21:52:11 +08:00
Gan Eng Chin 39ce470fe8
Specify dependency for useSelect in useNewCampaignTypes. 2023-03-09 21:43:54 +08:00
Gan Eng Chin 3ba492f32b
Move convert function out of useSelect in useNewCampaignTypes.
This is so that it doesn't become dependency in useSelect.
2023-03-09 21:42:59 +08:00
Fernando Marichal 3edd8f48cb
Add validation to enable Save attributes and Save variations buttons (#37046)
* Add validation for attributes and variations

* Enable save button when data is valid

# Conflicts:
#	plugins/woocommerce/includes/admin/meta-boxes/views/html-product-data-variations.php

* Add changelog

* Remove if

* Remove validation while saving

# Conflicts:
#	plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js

* Rename method `is_attribute_or_variation_empty`

* Add button title when disabled

# Conflicts:
#	plugins/woocommerce/includes/admin/meta-boxes/views/html-product-data-variations.php

* Fix typo

* Fix e2e tests

* Convert functions into global fn

* Use maybe_disable_save_button

* Fix validation

* Refactor `is_attribute_or_variation_empty`

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-03-09 10:32:24 -03:00
Sam Seay bec3ec18ac
Update Syncpack and use it to pin @wordpress packages to wp-6.0 (#37034) 2023-03-09 10:13:25 +13:00
Yousuf Hossain 92f94248cd
Added woocommerce_reduce_order_item_stock action hook to let other plugin hook functionalities without looping through the order items again and again. (#34721)
* Added woocommerce_reduce_order_item_stock action hook to let other plugins do somthing without looping again the order line items

* changed "product data" to "change details" and updated docblock as instructed

* maintained WP coding standards and change @since docblock tag
2023-03-08 18:05:40 -03:00
Ron Rennick 83fb31db8e
Orders: Update date modified on refund (#37047) 2023-03-08 13:10:49 -04:00
Justin Palmer a74f80d19d
Add tracking support for marketplace and multichannel marketing options. (#37017) 2023-03-08 15:41:46 +01:00
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
jonathansadowski 81fdbe3125
Update release post tool tmp path (#36836) 2023-03-07 09:13:15 -06:00
Rodrigue fc0030eb4a
Fix/37083 page displays 0 for empty recommended channels (#37104) 2023-03-07 17:12:02 +02: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