Commit Graph

50698 Commits

Author SHA1 Message Date
jonathansadowski f8d8a42fd7
Add PR links to release post template output, and allow blog ID to be specified. (#36026)
* Update release template to be editable

* Correct issues in README

* Update to allow edits; refactor auth

* Update templates to add PR link

* Remove commented test code

* Update tools/code-analyzer/src/lib/scan-changes.ts

Co-authored-by: Sam Seay <samueljseay@gmail.com>

* Address typescript issues; prettier

* Resolve more typescript issues

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2023-01-23 08:31:59 -06:00
Luigi Teschio d5a679c3f2
bump WooCommerce blocks package to 9.4.1 (#36553) 2023-01-23 14:09:17 +01:00
louwie17 4ff0aebc56
Update product mvp feature flag (#36552)
* Move product management feature to experimental and add additional note.

* Add changelog

* Remove tooltip

* Fix lint error
2023-01-23 07:43:47 -04:00
Adrian Duffell b87df2fd4a
Add SlotFill for Task List Footer (#36527)
* Add footer slot

* Add ExperimentalWooTaskListFooter slot to task list

* Update inline documentation

* Add changelog
2023-01-23 13:48:42 +08:00
Fernando Marichal 71a7bd4360
Fix/36530 settings tables styles (#36531)
* Fix settings tables

* Add changelog

* Fix lint

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-21 17:34:02 -03:00
Gan Eng Chin 76d5762400
Add changelog. 2023-01-21 23:24:17 +08:00
Gan Eng Chin 0c03fa2fb0
Merge branch 'feature/code-refactor-marketing' into feature/34906-marketing-channels-card
Conflicts:
	plugins/woocommerce-admin/client/marketing/components/index.js
	plugins/woocommerce-admin/client/marketing/types/index.ts
2023-01-21 23:17:32 +08:00
Gan Eng Chin d70fb07f31
Modify PluginCardBody to accept className, and change description type. 2023-01-21 23:13:13 +08:00
Gan Eng Chin 6baa403071
Move and rename type Plugin to RecommendedPlugin. 2023-01-21 23:12:04 +08:00
Gan Eng Chin d252922110
Rename file Plugin to InstalledPlugin.
(cherry picked from commit 0229354da0)
2023-01-21 23:11:47 +08:00
Gan Eng Chin 8873252c45
Rename type Plugin to InstalledPlugin.
(cherry picked from commit 56dbf53a35)
2023-01-21 23:11:36 +08:00
Gan Eng Chin 0fe028d8c2
Code refactor with CardHeaderTitle component.
This component will be used in other components later.

(cherry picked from commit 995fb7e02d)
2023-01-21 23:10:31 +08:00
Gan Eng Chin 3f56382cf1
Code refactor with CenteredSpinner.
(cherry picked from commit 5216643465)
2023-01-21 23:09:06 +08:00
Ilyas Foo 30a4bdefd8
Add Tasklist extensibility and WooOnboardingTaskListHeader SlotFill (#36519)
* Add experimental onboarding_tasklist PHP filter

* Add WooOnboardingTaskListHeader and woocommerce_onboarding_task_list_header Slot to task list

* Changelog

* Fix header task logic

* Remove React FC types

* Update changelog

* Fix comment
2023-01-21 15:19:20 +08:00
RJ 39cd780e18
add: slot for tasklist completion component slotfill (#36487)
* add: slot for tasklist completion component slotfill

* added fillprops and changed to experimental slotfill name
2023-01-21 11:05:45 +08:00
Corey McKrill 4b179e1d18
ReserveStock: Modify reserved stock query when HPOS is in use
Ensures reserved stock is correctly counted when HPOS tables are
used and not kept in sync with the posts table.
2023-01-20 18:02:00 -08:00
Corey McKrill bd0d4d6ac7
ReserveStock: Add method to detect if HPOS tables are in use
This method is copied from WC_Customer_Data_Store.
2023-01-20 17:24:41 -08:00
Gan Eng Chin 1af1524b83
Rename CSS installed-channel to registered-channel. 2023-01-21 02:38:00 +08:00
Gan Eng Chin ef669d8ca2
Rename InstalledChannel to RegisteredChannel. 2023-01-21 02:36:39 +08:00
Gan Eng Chin 8754003fb0
Add mapping for sync-failed product listings status. 2023-01-21 02:26:19 +08:00
Gan Eng Chin 2a15f09514
Remove TODO comments. 2023-01-21 02:22:30 +08:00
Gan Eng Chin 3cc568b4ed
Remove duplicated RecommendedChannel type. 2023-01-21 02:20:06 +08:00
Gan Eng Chin 0b1ab21836
Rename types. 2023-01-21 02:14:36 +08:00
Joel Thiessen 67d811a67d
Migrating attributes section in product editor to slot fills (#36483) 2023-01-20 08:56:56 -08:00
Gan Eng Chin a511054a3e
Merge branch 'feature/34903-multichannel-marketing-frontend/main' into feature/34903-multichannel-marketing-frontend/34906-channels-card 2023-01-21 00:10:00 +08:00
Gan Eng Chin 4e42823b48
Merge branch 'trunk' into feature/34903-multichannel-marketing-frontend/main
Conflicts:
	plugins/woocommerce/src/Admin/Marketing/MarketingChannelInterface.php
2023-01-21 00:09:27 +08:00
RJ 7d8f7ad57c
add: slot for header banner slotfill (#36467) 2023-01-20 22:01:20 +08:00
Nima Karimi da6b4919f8
Multichannel marketing backend and API (#36453)
* Multichannel Marketing - Core Library (#35099)

* Create channel interface and campaign value class

* Create MarketingChannels class

* Register MarketingChannels class in DI container

* Use the new MarketingChannels class to get the installed marketing extensions' data

* Use DI container to access InstalledExtensions class

* Add InstalledExtensions to the $provides array

* Hint that campaign cost should also indicate the currency

* Initialize the channels array

* Add unit tests for MarketingCampaign

* Add unit tests for MarketingChannels

* Add Price class to represent a price with currency

* Use Price class for marketing campaign's cost

* Define a constant to indicate the MCM classes exist

This constant will be checked by third-party extensions before utilizing any of the classes/interfaces defined for this feature.

* Create MarketingSpecs class to include WC.com API calls

* Remove WC.com API calls from Marketing class

And replace them with calls from MarketingSpecs class.

* Use the const from MarketingSpecs

* Fix MarketingChannels unit tests

* Add missing settings URL to the channel data

Co-authored-by: Nima <nima.karimi@automattic.com>

* Multichannel Marketing - Changes to the marketing classes (#36012)

* Rename `get_errors_no` to `get_errors_count`

* Remove the validation for marketing channel slugs

Do not check if the marketing channel's slug exists in the list returned by WooCommerce.com Recommendation API. This allows any third-party extension to register as a marketing channel.

* Revert InstalledExtensions

The InstalledExtensions class will be used by the previous generation of the Marketing dashboard (if the user has not enabled the new "Marketing" feature); therefore, it's best to restore it to the original code.

* Fix code style

* Translate Exception message

* Remove doc references to a predetermined list of marketing channels

Co-authored-by: Nima <nima.karimi@automattic.com>

* Multichannel Marketing - API (#36222)

* Rename `get_errors_no` to `get_errors_count`

* Remove the validation for marketing channel slugs

Do not check if the marketing channel's slug exists in the list returned by WooCommerce.com Recommendation API. This essentially allows any third-party extension to register as a marketing channel.

* Revert InstalledExtensions

The InstalledExtensions class will be used by the previous generation of Marketing dashboard (if the user has not enabled the new "Marketing" feature); therefore, it's best to restore it to the original code.

* Fix code style

* Add channel property to MarketingCampaign

* Add methods to filter the recommended marketing channels and extensions

* Add `marketing/recommendations` API

* Add unit tests for `marketing/recommendations` API

* Add `marketing/channels` API

* Add unit tests for `marketing/channels` API

* Add `marketing/campaigns` API

* Add unit tests for `marketing/campaigns` API

* Translate Exception message

* Remove doc references to predetermined list of marketing channels

* Add `unregister_all` method

To allow unregistering all marketing channels.

* Unregister all channels on test tear down

* Change API access denied authorization code

* Change API access permission

* Add MarketingCampaignType class

This allows defining campaign types for each marketing channel.

* Add campaign type property to campaign class

* Add `marketing/campaign-types` API

This API returns the aggregated list of supported marketing campaign types for all registered marketing channels.

* Add unit tests for `marketing/campaign-types` API

* Remove unused jsonSerialize method

* Fix unit tests

Co-authored-by: Nima <nima.karimi@automattic.com>

* Add changelog

* Add product listing status sync failed

Co-authored-by: Nima <nima.karimi@automattic.com>
2023-01-20 14:56:54 +03:00
Luigi Teschio bc6bc8f9b6
Update WooCommerce blocks package to 9.4.0 (#36524)
bump WC Blocks version
2023-01-20 12:01:03 +01:00
Matt Sherman d1bd4f5538
Add permalink_template and generated_slug to products REST API response (#36497)
* Add permalink_template and generated_slug to posts REST API

* Changelog

* Add missing domain for translations

* Use strict comparison for in_array

* Fix code style (alignment) issue

* Update number of expected properties in products schema
2023-01-19 20:28:25 -05:00
Nathan Silveira 1123f9991f
Scroll newly added attribute into view (#36447)
* Scroll newly added attribute into view

* Increment changelog

* Add smooth scrolling when adding new attributes
2023-01-19 19:43:36 -03:00
Néstor Soriano 383c942fa7
Add an admin notice about the upcoming change in PHP requirements (PHP 7.3) (#36444)
* Add an admin notice about the upcoming change in PHP requirements

The minimum required PHP version will be 7.3 as of WooCommerce 7.7.
This adds a dismissable admin notice to PHP 7.2 users.

* Add changelog file

* Disable PHPCS warnings for TODO items (required by GitHub CI)

* Reformat the PHP 7.3 requirement notice to be more translators-friendly

* Add a translators note to pass linting

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2023-01-19 13:30:01 -08:00
Moon 395f3b3eb5
Add slot for ProgressHeader and ProgressTitle (#36482)
* Add slot for ProgressTitle

* Add slot for ProgressHeader

* Add changelog

* Add experimental prefix
2023-01-19 13:21:54 -08:00
Moon 0d67a6aaf1
Migrate Table component to TS (#36370)
* Migrate table component to TS

* Revert pnpm-lock to orig

* Revert pnpm-lock to orig

* Fix eslint errors

* Update packages/js/components/src/table/empty.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/table/empty.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Remove unnecessary empty space and convert comment stlye

* Update packages/js/components/src/table/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Remove unnecessary type casting

* Type defaultOnQueryChange func correctly

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-19 13:05:12 -08:00
Barry Hughes a7b1beaa05
Error message in server logs on CSV export error (#34802) 2023-01-19 11:59:12 -08:00
Nathan Silveira 924e64aa48
Add new filter to add additional clauses for SQL statement in Variations report (#36378)
* Apply filter to get additional sql to include variations with no orders

* Add join only when correct option is selected

* Some more desperate tests

* Analytics: use a sepoarate query for data without orders.

* Change 'experimental_woocommerce_analytics_variations_additional_clause' filter to apply sql clauses directly

* Cleanup

* Add changelog

* Fix PHPCS issues

* Add docblock and update the filter name

* Improve docblock of new filter

* Add Since 7.4.0 on filter

* Move union statement before order by statement

* Apply filters before running the db count statement and add sql select clause before

* Remove with sql clause since it's not compatible with MySQL 5.7

* Remove additional spaces

* Fix bug caught by unit test in which $variations_query is overwritten because the assignment was outside the 'else' statement

Co-authored-by: AnnaMag <anna.mag.kedzierska@gmail.com>
2023-01-19 16:19:24 -03:00
Maikel David Pérez Gómez eca891df09
Create tree-control component (#36432) 2023-01-19 13:59:08 -05:00
barryhughes c42f99048d Linting (clean-up whitespace). 2023-01-19 10:07:39 -08:00
Barry Hughes fe6ab3ea4e
[HPOS] wc_get_order() should use global post/order object if necessary (#36496) 2023-01-19 10:00:38 -08:00
Joel Thiessen 687dd6fdfe
Migrating product editor images section to slot-fill (#36461) 2023-01-19 09:45:30 -08:00
barryhughes f11def132b Improve error logging when file permissions prevent CSV generation. 2023-01-19 09:39:22 -08:00
Gan Eng Chin d69f078fd5
Replace useIsPluginInstalled with useIsPluginInstalledNotActivated. 2023-01-20 01:36:39 +08:00
Gan Eng Chin cd0402a10c
Refetch registered channels after install and activate recommended channels. 2023-01-20 01:02:41 +08:00
Gan Eng Chin 9fa6ea4a25
Display activate button for channels that are not yet activated. 2023-01-20 00:36:34 +08:00
David Marín 7e17a96914
Making function more robust against wrong transients (#34742)
* Making function more robust against wrong transients

* Add changelog

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-01-19 12:34:46 -03:00
Mert Şakar 5cda49f269
Fix issue #34344 - Cannot edit replies to product reviews (#35888)
* Fix issue #34344 - Cannot edit replies to product reviews

* Simplify logic in product review edit screen.

* Add changelog

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-01-19 11:56:11 -03:00
Gan Eng Chin 223ea4d712
Filter recommended channels to get "not installed" or "not activated" channels. 2023-01-19 22:23:00 +08:00
Barry Hughes ece2fb71ce
Update Action Scheduler to 3.5.4. (#36433)
* Update Action Scheduler to 3.5.4.

* Update changelog

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-01-19 09:08:46 -03:00
Gan Eng Chin cf4c62e707
Fix loading bug in useRecommendedChannels. 2023-01-19 19:50:56 +08:00
Gan Eng Chin b708cc18ff
Get recommended channels from API. 2023-01-19 19:33:51 +08:00