Commit Graph

9627 Commits

Author SHA1 Message Date
Gan Eng Chin 75c11a681d
Simplify CSS to have less hardcoded width value. 2023-03-20 00:11:32 +08:00
Gan Eng Chin 38370cc544
Remove unneeded CSS. 2023-03-19 23:34:17 +08:00
Gan Eng Chin ddd287cc4c
Show Campaigns card when banner is dismissed or campaigns total is truthy. 2023-03-19 23:30:21 +08:00
Gan Eng Chin 11683be1a8
Set default parameter values for useCampaigns. 2023-03-19 23:17:22 +08:00
Gan Eng Chin 458c16bad9
Move useCampaigns to shared hooks directory. 2023-03-19 22:54:55 +08:00
Gan Eng Chin c6a95ae9bf
Rename callback props in IntroductionBanner to make them clearer. 2023-03-19 21:10:22 +08:00
Gan Eng Chin 6b75b5db38
Rename variables to make them clearer. 2023-03-19 20:58:54 +08:00
Gan Eng Chin 155211d77a
Remove unneeded Icon component. 2023-03-19 20:56:00 +08:00
Gan Eng Chin 65523e36dd
Fix spacing for close button in IntroductionBanner. 2023-03-19 20:54:34 +08:00
Gan Eng Chin 1b65be0a53
Fix useSelect dependency in useIntroductionBanner. 2023-03-19 20:50:37 +08:00
Gan Eng Chin 99c6ebff15
Remove the use of isOptionsUpdating in useIntroductionBanner.
isOptionsUpdating will return true for any option update, not just our option here. This causes issue as shown in demo video in https://github.com/woocommerce/woocommerce/pull/37110#discussion_r1130531104.

We can just depend on getOption. When we update an option, it will be updated immediately in wp.data store before making API request to update the option in database (see c5564a15c1/packages/js/data/src/options/actions.ts (L44)).
2023-03-19 20:38:20 +08:00
Gan Eng Chin 162d790a7a
Update option name and value to make it more indicative. 2023-03-19 20:16:04 +08:00
Gan Eng Chin 49253425b2
Specify dependency for useSelect in useIntroductionBanner.
Co-authored-by: Eason <eason.su.tw@gmail.com>
2023-03-19 20:12:09 +08:00
Gan Eng Chin 7cc8e065f9
Merge branch 'trunk' into feature/34904-marketing-introduction-banner 2023-03-19 20:09:23 +08:00
Gan Eng Chin f45e43b990
Add changelog. 2023-03-19 18:06:44 +08:00
Gan Eng Chin e20b9d1ac9
Filter out marketing channels in useRecommendedPlugins. 2023-03-19 18:06:39 +08:00
Gan Eng Chin 8c151984ad
Filter installed plugins against marketing channels in useInstalledPlugins. 2023-03-19 18:06:34 +08:00
Gan Eng Chin 555116f3df
Fix broken tests for CreateNewCampaignModal.
The tests had errors because useInstalledPlugins is added into the component and it is not mocked in the tests.
2023-03-19 17:59:35 +08:00
Matt Sherman c5564a15c1
Filter Variations report variation attributes correctly (#37223)
* FIx Variations report
* Fix Orders report
* Remove ability to pass table into get_attribute_subqueries since it should always be the same table we join on
2023-03-17 14:05:51 -04:00
louwie17 345ad58919
Add product pricing block (#37211)
* Adding initial pricing block

* Have price block render in form

* Make sure price is loaded correctly and fix template rendering

* Make pricing block abstract and add list and sale price to template

* Add changelogs

* Revert changes in wc/data package

* Fix lint issues

* Fix type error

* Add styling

* Fix styling lint issues

* Revert config change missed in rebase

* Make use of base control help text for field info

* Allow additional callbacks for onFocus and onKeyUp
2023-03-17 14:03:10 -03:00
Gan Eng Chin ffc36d808c
Add changelog. 2023-03-18 00:52:04 +08:00
Gan Eng Chin 1aaa26e07d
Reload installed extensions data after installing recommended channels.
This is because the channel may not have registered itself as a marketing channel and it should show up in the Installed extensions card.
2023-03-18 00:47:54 +08:00
Maikel David Pérez Gómez e370f25c0c
Add a product header component to the blocks interface (#37152)
* Add button and saving logic

* Add comment suggestions

* Add changelog files

* Add comment suggestions

* Set header title to product name if the name field is dirty otherwise the default title value

* Navigate to EditProductPage after creating the product succesfully

* Add get-header-title util and expose edited product name from useSelect
2023-03-17 13:21:15 -03:00
github-actions[bot] 14675be4f0
Delete changelog files based on PR 36871 (#37297)
Delete changelog files for 36871

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-03-17 10:14:18 -05:00
github-actions[bot] a4c9e471b2
Delete changelog files based on PR 37277 (#37294)
Delete changelog files for 37277

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-03-17 10:11:46 -05:00
Gan Eng Chin 8070f65ec7
Make sure expression before `&&` is always boolean in React rendering in marketing page (#37227) 2023-03-17 22:56:35 +08:00
Gan Eng Chin aa15311e8b
Disable React Fast Refresh completely in webpack when running `start` command (#37289) 2023-03-17 22:22:50 +08:00
Matt Sherman ffc5b911ee
Bypass scheduled actions for customer updates (#37265)
* Bypass scheduler for customer update

* Handle case when wc_last_active user meta doesn't exist at all

* Bypass scheduler for wc_last_active customer update

* Bypass scheduler for delete_user and remove_user_from_blog

* Bypass scheduler for woocommerce_privacy_remove_order_personal_data

* Bypass scheduler for woocommerce_new_customer

* Remove obsolete test for last_active_update sync

* Remove assertions for pending wc-admin_import_customers
2023-03-17 10:11:06 -04:00
Chi-Hsuan Huang 9ea8b630ee
Remove cart2cart option from product task (#37285)
* Remove cart2cart option from add product task

* Remove cart2cart link test

* Add changelog

* Fix unit test

* Fix lint
2023-03-17 20:15:31 +08:00
Chi-Hsuan Huang cbafbd53c4
Update plugins/woocommerce/changelog/dev-update-webpack-config
Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>
2023-03-17 19:44:09 +08:00
Peter Fabian a45b67d390
Prevent dbDelta from running unnecessary ALTER table during upgrade (#37277) 2023-03-17 12:03:17 +01:00
Chi-Hsuan Huang f5b80b84cf Add changelog 2023-03-17 17:53:14 +08:00
Chi-Hsuan Huang a6e3398e06 Disable React Fast Refresh completely in webpack when running start command 2023-03-17 17:52:24 +08:00
Vedanshu Jain 329c65ed76 Better language, and allow deleting by inherited classes too. 2023-03-17 14:58:35 +05:30
Vedanshu Jain c99f17592c Add changelog. 2023-03-17 14:03:47 +05:30
Vedanshu Jain 22cfecd522 Also delete when order type is placehoder, since it was created by HPOS. 2023-03-17 14:02:59 +05:30
Vedanshu Jain 31134c7055 Revert "Also delete when order type is placehoder, since it was created by HPOS."
This reverts commit 5e636046dd.

Reverting so that it can be properly included in a seperate PR
2023-03-17 14:01:52 +05:30
Vedanshu Jain ade1540ece Merge branch 'trunk' into hpos/unit-tests 2023-03-17 13:39:19 +05:30
Néstor Soriano 196c4f889c
Load same stylesheets in the Site Editor as in the frontend (#36911) 2023-03-17 09:07:37 +01:00
Chi-Hsuan Huang a643fef112
Fix woocommerce-admin "packages" commands (#37204)
Fix WCA run packages command

Add changelog
2023-03-17 15:11:33 +08:00
Chi-Hsuan Huang 2699aeca6b
Update default payment gateways for payment partners (#37233)
* Update default payment gateways

* Add changelog

* Move cod
2023-03-17 14:38:35 +08:00
RJ 23b79428f7
add: payment transaction processor images to payment recommendations (#37230) 2023-03-17 13:49:50 +08:00
RJ 04f34e9636
fix: payments recommendations pane wrong image size (#37259) 2023-03-17 12:29:19 +08:00
Fernando Marichal 0f733d1db2
Record values for toggled checkboxes/features in settings (#37242)
* Record toggled values

* Improve `tab` and `section` recording.

* Add changelog

* Fix lint

* Fix lint

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-03-16 15:22:51 -03:00
Gan Eng Chin f769a8c6f5
Merge branch 'trunk' into feature/34904-marketing-introduction-banner
Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2023-03-17 01:21:13 +08:00
Matt Sherman 9c5e9b57bf
Move CES data store to @woocommerce/customer-effort-score (#37252) 2023-03-16 10:22:33 -04:00
Matt Sherman 97b6ae086f
Initial e2e tests for new product editor (form-based) (#36902) 2023-03-16 09:51:01 -04:00
Ahmed 3985242547
Add onboarding support for new countries in WCPay (#36906)
* Add new countries to WCPay

* changelog

* add new countries code to woocommerce admin

* Add the new countries to onboarding wizard fallback config file

---------

Co-authored-by: Anurag Bhandari <anurag@automattic.com>
2023-03-16 20:48:45 +08:00
Jorge A. Torres b19ad2f6d7
Prevent possible PHP warnings produced by 'woocommerce_ajax_order_items_removed' hook (#37178)
* Remove superfluous check.

* Prevent PHP warnings in `woocommerce_ajax_order_items_removed`

* Add changelog
2023-03-16 08:42:01 -03:00
Albert Juhé Lluveras 6f757f8991
Update WooCommerce Blocks package to 9.8.1 (#37238) 2023-03-16 10:52:55 +01:00
Joshua T Flowers 77937dd8cb
Move usePreventLeavingPage to navigation package (#36752)
* Move usePreventLeavingPage to navigation package

* Rename usePreventLeavingPage to useConfirmUnsavedChanges

* Move imports to external dependencies

* Fix up history push overrides

* Add changelog entries

* Fix up rebase issues

* Update i18n dependency to wp-6.0

* Fix up lock file

* Remove unused imports

* Update lock file

* Remove self import for navUtils
2023-03-16 05:33:22 -03:00
RJ 1c9b3a58fe
fix: mobile app connection owner bug (#37170) 2023-03-16 16:20:36 +08:00
Chi-Hsuan Huang f50abc724f
Remove accordion from "Other payment providers" in WC Pay Task (#37205)
* Remove accordion from Other payment providers in WC Pay Task

* Add changelog

* Fix tests

* Update test

* Fix e2e test
2023-03-16 12:11:59 +08:00
Chi-Hsuan Huang c804e76156
Set up "React Fast Refresh" in woocommerce-admin (#37165)
* Add @pmmmwh/react-refresh-webpack-plugin, react-refresh, webpack-dev-server and add start:hot command

* Set up react fast fresh

* Add changelog

* Run prestart in hot command

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml
2023-03-16 11:52:03 +08:00
rodelgc 55d864aaf3 Add changelog 2023-03-16 09:17:23 +08:00
rodelgc 8f6fdf74b0 Search up to 100 release tags/versions 2023-03-16 09:15:42 +08:00
Matt Sherman fb3a920a7e
Update Customers report with latest user data after editing user (#37237) 2023-03-15 19:11:26 -04:00
louwie17 93506388e3
Update product rest config and template block usage (#37206)
* Update product post rest configs

* Update block usage

* Add changelogs

* Fix lint

* Make use of setupEditorState instead of setupEditor as we do not have a content block

* Simplify product condition

* Make use of core store only
2023-03-15 13:44:05 -03:00
witlock c8f7a564c5
Add/Remove order coupon actions logged in notes (#30642)
* log admin coupon code actions

* added documentation, fixed return value

* formatting

* included user to note logs

* Add changelog

* Address PHPCS issues

* Make WC_Abstract_Order::remove_coupon() return a bool

* Move addition of coupon-related order notes from WC_Order to AJAX callbacks

* Address PHPCS problems

* Pass coupon order notes through `esc_html()`

* Add AJAX update of notes when adding/removing coupons via admin

* Fix tests (maybe?)

---------

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-03-15 13:33:46 -03:00
Jon Lane 7781410372 Changelog 2023-03-15 10:23:00 -06:00
Jon Lane 171cd337b8 Fixes failing variable product test 2023-03-15 10:21:47 -06:00
Tam Mullen 562fede1e2
Update the CI workflow to include WP 6.0 and 5.9 (#37180)
Update the CI workflow to include WP 6.0 and 5.9 matching our L-2 support policy
2023-03-15 15:49:33 +00:00
Moon 16c7c58462
Update Avalara CTA copy in tax task (#37224)
* Change CTA to Download

* Add changelog
2023-03-14 22:37:07 -07:00
Gan Eng Chin dd6856a6c0
Add changelog. 2023-03-15 08:27:52 +08:00
Gan Eng Chin aef22190d2
Make sure expression before && is always boolean in React rendering in marketing page. 2023-03-15 08:24:00 +08:00
Gan Eng Chin 98dcb9bea4
Specify args for wp.data resolution in marketing page to support WP 5.9 (#37198) 2023-03-15 07:30:40 +08:00
Matt Sherman 4cabe5f6b5
Add Tracks events for product inventory tab (#37202) 2023-03-14 18:16:01 -04:00
mynewvk f43e36a45b
Display price depend on price location (#25080)
* display price depend on price location

* change arg key

* test for wc_get_price_to_display

* fix spacing & function docblock

* Add changelog file

* Address PHPCS issues

* Rename `display_location` to `display_context`

* Address PHPCS issues

* Update changelog wording

---------

Co-authored-by: Kolya lukin <mykola@imagecms.net>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-03-14 18:27:39 -03:00
Ron Rennick 3809392f7c
Use dbDelta and truncate to manage attribute lookup tables (#36872) 2023-03-14 13:42:35 -03:00
Albert Juhé Lluveras b88e07eda6
Update WooCommerce Blocks package to 9.8.0 (#37210) 2023-03-14 17:37:38 +01:00
Matt Sherman b94d38458d
Add components to @woocommerce/customer-effort-score (#37112)
* Update src structure of @woocommerce/customer-effort-score

* Changelog

* Add dependencies to @woocommerce/customer-effort-score

* Move useCustomerEffortScoreExitPageTracker and utils to @woocommerce/customer-effort-score

* Fix up imports from @woocommerce/customer-effort-score

* Changelog

* Fix import of constant

* Mock @woocommerce/customer-effort-score in tests

* Move tests to @woocommerce/customer-effort-score

* Update lock file

* Update lock file from trunk

* Update lock file again... this time, tests pass
2023-03-14 12:16:19 -04:00
Vedanshu Jain 52890fccab Fix typo. 2023-03-14 17:28:50 +05:30
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
Gan Eng Chin 580e3a8c36
Add changelog. 2023-03-14 03:39:34 +08:00
Gan Eng Chin 0316fbb265
Specify empty array as hasFinishedResolution args.
This is to make things consistent with invalidateResolution to make things work with WP 5.9.
2023-03-14 03:35:20 +08:00
Gan Eng Chin 5a58784a62
Specify empty array as invalidateResolution and hasFinishedResolution args.
This is to make things work with WP 5.9.
2023-03-14 03:32:54 +08:00
Vedanshu Jain 09581201f2 Add changelog. 2023-03-13 21:57:42 +05:30
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
Vedanshu Jain 43fedcfc5a Add unit test to ensure caching does not affect sort order. 2023-03-13 20:08:58 +05:30
Vedanshu Jain 0746305ec1 Restore the sort order when orders are cached. 2023-03-13 19:33:59 +05:30
Vedanshu Jain 5e636046dd Also delete when order type is placehoder, since it was created by HPOS. 2023-03-13 16:35:05 +05:30
Gan Eng Chin 0cf56774f5
Merge branch 'trunk' into feature/34909-marketing-create-campaign-modal 2023-03-13 12:51:24 +08:00
Gan Eng Chin baf9408f69
Merge branch 'feature/34909-marketing-create-campaign-modal' into feature/34904-marketing-introduction-banner
Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2023-03-13 01:02:12 +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
Vedanshu Jain f497146de9
Merge branch 'trunk' into hpos/unit-tests 2023-03-10 15:21:57 +05:30
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
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
Nestor Soriano a203681b96
Merge branch 'trunk' into fix/tax_lookup_and_order_stat_deletion 2023-03-09 16:15:57 +01: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
Gan Eng Chin 6d72c2bbe1
Fix failed test for Campaigns component. 2023-03-09 01:08:28 +08:00
Gan Eng Chin 66e46d8942
Run lint:css-fix. 2023-03-09 00:34:20 +08:00
Justin Palmer a74f80d19d
Add tracking support for marketplace and multichannel marketing options. (#37017) 2023-03-08 15:41:46 +01:00
Vedanshu Jain 9b8a9eb0aa
Fix unit tests for order and customer functions to provide HPOS compat. (#36905) 2023-03-08 15:51:06 +05:30
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 1a28784bbe
Add changelog. 2023-03-08 03:06:05 +08:00
Gan Eng Chin 4068808f0a
Merge branch 'feature/34909-marketing-create-campaign-modal' into feature/34904-marketing-introduction-banner 2023-03-08 03:03:31 +08:00
Gan Eng Chin 97ed1d2a7d
Fix array length rendering literal 0 in CreateNewCampaignModal. 2023-03-08 02:57:02 +08:00
Gan Eng Chin 42ac7e4d28
Better logic for displaying buttons in IntroductionBanner. 2023-03-08 02:54:43 +08:00
Gan Eng Chin 8fe3781266
Use ref instead of location hash to scroll to add channels section. 2023-03-08 02:06:06 +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
Gan Eng Chin 0cb2fb1cd0
Display CreateNewCampaignModal upon button click in IntroductionBanner. 2023-03-08 00:37:55 +08:00
Gan Eng Chin a9b696d28c
Move CreateNewCampaignModal to shared components folder. 2023-03-08 00:34:09 +08: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
Gan Eng Chin 7c9eedbbb4
Merge branch 'feature/34909-marketing-create-campaign-modal' into feature/34904-marketing-introduction-banner
Conflicts:
	plugins/woocommerce-admin/client/marketing/hooks/index.ts
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/RecommendedChannels.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2023-03-07 00:46:38 +08:00
Vedanshu Jain 5dffc39b12
Fix API unit test for HPOS compat (#36910) 2023-03-06 21:29:50 +05:30
Ron Rennick c67ccf6492
Move the changelog to the correct folder 2023-03-06 10:49:21 -04:00
Vedanshu Jain 77f7cf9879
Update PayPal tests for HPOS compat. (#36909) 2023-03-06 17:23:22 +05:30