Commit Graph

9426 Commits

Author SHA1 Message Date
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
Néstor Soriano 00b8a8e76c
Merge branch 'trunk' into fix/load-theme-specific-stylesheet-in-site-editor 2023-02-24 16:35:55 +01: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
Gan Eng Chin 20ae504be0
Add controls with fetchWithHeaders. 2023-02-24 02:08:59 +08:00
Joshua T Flowers 87d79f15a3
Move product editor utils to product editor package (#36730)
* Move product editor utils to product editor package

* Add changelog entries

* Move remaining utils

* Move util import/exports to separate index file
2023-02-23 09:48:49 -08:00
Néstor Soriano ba7fef3bcf
Merge branch 'trunk' into fix/cant-apply-coupon-0 2023-02-23 12:05:50 +01:00
Nestor Soriano 59a55b8561
Add changelog file 2023-02-23 11:52:01 +01:00
Nestor Soriano 3b4b85ba1f
Fix: can't apply or remove a coupon whose code is "0".
Also added two new methods in StringUtil: is_null_or_empty
and is_null_or_whitespace.
2023-02-23 11:49:38 +01:00
Saad Tarhi 615365d14e Fix "undefined `disable_ui` index" error 2023-02-23 11:31:01 +01:00
Saad Tarhi b312c65a95 Fix PHPCS errors 2023-02-23 09:00:10 +01:00
Saad Tarhi 2ed94d56c3
Merge branch 'woocommerce:trunk' into add/36413-support-for-cart-checkout-in-declare-compatibility 2023-02-23 08:38:03 +01:00
Saad Tarhi b5b0c28ed0 Add generic approach to adding features without UI
In our case for the Cart & Checkout feature, we don't want to show the
UI in the "Features" tab in Woo Settings. Creating a flag for this
purpose will make it easier for future features to unsubscribe from
showing a UI if required
2023-02-23 08:37:05 +01:00
Saad Tarhi 390efe8bdd Fix PHPCS lint error 2023-02-22 19:05:52 +01:00
Luigi Teschio b0e5db0bfe
Bump WooCommerce blocks package to 9.6.2 (#36919)
bump WooCommerce blocks package to 9.6.2
2023-02-22 15:51:04 +01:00
Néstor Soriano f9f6e68e21
Merge branch 'trunk' into revert-34992-revert-34396-add/order_cache 2023-02-22 13:08:52 +01:00
Cluster CIS 7feaed74fa
Fix selectors for quantity element in variable products (#36871)
Fixes bug introduced in PR #36087 that changes jQuery selectors for quantity input in variable products.

The previous logic is reinstated so that $qty points to the div wrapper, and $qty_input points to the input element inside.

Otherwise, as is in the current version, $qty_input is undefined and the min/max attributes are not updated.

This PR also addresses the original issue #36086 by restricting the selector of the div wrapper to only be the one containing input[name=quantity] (the .qty class filter is also kept to avoid any potential malfunctions of existing code).
2023-02-22 12:43:57 +01:00
Vedanshu Jain 48ec7b8864
Merge branch 'trunk' into revert-34992-revert-34396-add/order_cache 2023-02-22 10:00:29 +05:30
Barry Hughes 2e146d596f
Merge branch 'trunk' into fix/wc_add_number_precision-not-supporting-null 2023-02-21 11:36:53 -08:00
Albert Juhé Lluveras f3c5131b8a Merge duplicate CSS selector 2023-02-21 14:58:05 +01:00
Albert Juhé Lluveras acfa4b635a Fix CSS whitespace and add comment 2023-02-21 14:39:38 +01:00
Albert Juhé Lluveras 921a124584 Add changelog entry 2023-02-21 14:36:47 +01:00
Albert Juhé Lluveras 3344b68653 Load same stylesheets in the Site Editor as in the frontend 2023-02-21 14:35:49 +01:00
Seghir Nadir 0a05717c83
Merge branch 'trunk' into add/tracking-for-loca-pickup 2023-02-21 12:49:42 +01:00
github-actions[bot] 733bcc88cf
Prep trunk for 7.6 cycle (#36899)
Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-02-21 12:37:14 +13:00
github-actions[bot] 4ea698d42f
Release: Remove 7.5 change files (#36901)
Delete changelog files from 7.5 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-02-21 12:36:55 +13:00
Corey McKrill aebf22dc2f
Site Health: Add WC-specific criteria for persistent object cache (#35202)
* Site Health: Add WC-specific criteria for persistent object cache

WP 6.1 introduces a new test in the Site Health module for whether the
site has an external object cache, and if not, whether it would benefit
from having one. However, the criteria it uses are based largely on
posts and comments. This introduces WooCommerce-specific criteria based
on orders and products. It uses much lower numbers for the
thresholds (100 instead of 1000). These thresholds are somewhat
arbitrary, but reflect that the data objects in a WooCommerce store are
larger and more complex than in a simple blog.

* Add changelog file
2023-02-20 15:01:17 -08:00
Nathan Silveira 41eab0d669
Add additional global attributes and local attributes information when saving product attributes (#36858)
* Add additional global attributes and local attributes information when saving product attributes

* Log only local attributes
Add attribute name
Fix issue with attribute_value and names selectors

* Save name and slug for global attributes and global terms
2023-02-20 23:55:01 +01:00
AnnaMag 48c8db8ade
Product editor: disable the feature in advanced Settings. (#36894)
* Product editor: disable the feature in advanced Settings
until we implement the new designs.

* Maintain feature enabled for internal testing.

* Remove obsolete new lines.

* Re-enable the feature flag.

* Disable the new product experience if currently enabled.

* Add changelog

* Remove commented lines, obsolete brackets. Fix conflicts.

* Styling.

* Fix lint

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-02-20 19:03:07 -03:00
jonathansadowski b3b6eacdf4
Update the stable tag to 7.4.0 (#36879)
* Update the stable tag to 7.4.0

* Create update-stable-tag-7-4-0
2023-02-20 08:21:38 -06:00
RJ d26dd4c772
Add: shipping plugins in shipping task based on location (#36873)
Co-authored-by: moon <moon.kyong@automattic.com>
2023-02-20 21:32:14 +08:00
Nestor Soriano 8a9f05f875
Fix phpcs stuff 2023-02-20 13:05:15 +01:00
Nestor Soriano 749dcdd009
Add changelog file 2023-02-20 12:42:43 +01:00
Nestor Soriano c7aab89092
Add support for null inputs in wc_add_number_precision 2023-02-20 12:34:48 +01:00
Nadir Seghir e1ace8332d fix linter 2023-02-20 12:33:11 +01:00
Ilyas Foo 6dd701d795
Remove Facebook/Meta from grow your store list (#36886)
* Remove meta

* Changelog

* Set facebook extension visibility flag to false
2023-02-20 18:52:53 +08:00
Ilyas Foo e03ed88410
Fix inconsistent colors products task icons (#36889)
* Remove colors overriding theme colors

* Changelog
2023-02-20 18:18:17 +08:00
Ilyas Foo 052bb39e8a
Temporary remove free trial terms from Avalara tax task (#36888)
* Remove free trial terms from Avalara tax task

* Changelog
2023-02-20 13:56:34 +08:00
Chi-Hsuan Huang 2d5fdfe578
Add a unit test for `woocommerce_admin_experimental_onboarding_tasklists` filter (#36827)
* Add a unit test for woocommerce_admin_experimental_onboarding_tasklists filter

* Add changelog

* Reformat

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/features/onboarding-tasks/task-lists.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-02-20 09:03:41 +08:00
Chi-Hsuan Huang 30409fa8c3
Update default payment gateway list (#36550)
* Remove Klarna payments from North America and remove Amazon pay from CA

* Update payment gateway list ordering priority

* Add changelog

* Sort gateways by recommendation_priority

* Fix DefaultPaymentGateways.php

Fix lint

Fix paypal

Fix comment

* Remove unneed comment

* Change eway priority to show after square
2023-02-20 09:02:57 +08:00
Tomek Wytrębowicz 586d471001 Remove `get_items_permissions_check` from `Reports\Controller`,
as it is implemented in the exact same shape in its parent class- `WC_REST_Reports_V1_Controller`
2023-02-18 19:39:58 +01:00
Tomek Wytrębowicz 26e7588d7d Add changelog entry 2023-02-18 19:11:45 +01:00
Tomek Wytrębowicz c161de857b Reuse parent `register_routes` method in `PerformanceIndicators\Controller`
as it is defined in `WC_REST_Reports_V1_Controller`.
2023-02-18 18:37:39 +01:00
Tomek Wytrębowicz 610d32da1a Remove redundant `register_routes` definition from `ReportsController`,
it's already defined in the exact same shape in its parent `WC_REST_Reports_V1_Controller`.
2023-02-18 18:18:20 +01:00
Tomek Wytrębowicz bd8168feb5 Remove redundant `$namespace = 'wc-analytics'` from classes that inherit from `ReportsController`
It's already set in parent class.
2023-02-18 18:15:19 +01:00
Moon 7d8247b069
Remove id column from experimental product import sample files (#36857)
* Remove ID column

* Add changelog
2023-02-17 14:11:43 -08:00
Barry Hughes 85be0f5e45
Fix decimal points for NOK currency (#36780) 2023-02-17 14:02:10 -08:00
Barry Hughes 96100062c0
Switched matching of screen ID with the untranslated string. (#36854) 2023-02-17 13:31:36 -08:00
Saad Tarhi 0de41672f5
Update WooCommerce blocks package to 9.6.1 (#36852) 2023-02-17 22:17:42 +01:00
Nathan Silveira 2ad2b79ac6
Fix inconsistencies on Analytics > Orders table when using date_paid or date_completed (#36876)
* Fix inconsistencies on Analytics > Orders table when using date_paid or date_completed

* Fix sniff

* Fix unit test
2023-02-17 17:52:10 -03:00
Barry Hughes 8a9f7fdb76
Update plugins/woocommerce/changelog/fix-36474 2023-02-17 10:52:18 -08:00
Michael Pretty a11f5926b1 lint fixes and fix typo 2023-02-17 11:26:55 -05:00
Michael Pretty 28256951aa Tweak test_initiate_regeneration_creates_lookup_table to insert properly with pre-defined table columns 2023-02-17 11:20:07 -05:00
Saad Tarhi c1f232225a Keep only one changelog file 2023-02-17 17:06:18 +01:00
nigeljamesstevenson 4b8e24cc9f
Make the selector a bit more strict to avoid collision (#36499) 2023-02-17 15:56:07 +00:00
Saad Tarhi e434d021f1 Revert the .gitignore change 2023-02-17 16:48:56 +01:00
Michael Pretty 2728ffd5bd disabling lint rule for query 2023-02-17 10:48:28 -05:00
Michael Pretty 54151becc5 Avoid preparing the table name for truncate query 2023-02-17 10:33:36 -05:00
Saad Tarhi 1e1111f329 Run "pnpm --filter=woocommerce changelog add" 2023-02-17 16:15:31 +01:00
Saad Tarhi d940569d50 Run "composer update -W woocommerce/woocommerce-blocks" 2023-02-17 16:13:19 +01:00
Saad Tarhi d3c22d52c9 Bump Woo Blocks version to 9.6.1 in composer.json 2023-02-17 15:51:20 +01:00
Michael Pretty 91ef6ae8ba adding changelog entry 2023-02-17 09:15:18 -05:00
Michael Pretty 02055537ac Switch to the use of dbDelta and truncate for the product attribute lookup tables over drop/create table. 2023-02-17 09:12:42 -05:00
Nathan Silveira 9d7e503519
Add date sorting configuration for Analytics (#36492)
* Include fields date_paid and date_completed to wp_wc_order_stats

TODO: add script to create new columns in the database

* Add update script and new columns in get_schema

* Add new configuration in Analytics > Settings to configure type of date used in Revenue report

* Change date_column_name to date_paid

TODO: This will be configurable in future

* Add date type config field

* Use customizable date field in DataStore

* Change label

* Fix linter errors

* Remove blank line

* Put default column name back to date_created

* Make date_paid and date_completed nullable to help with unit tests

* Remove new table creation in update function and use query method instead of get_var

* Extend stats constructor

* Improve date type configuration description

* Set date column name default to date_created to test if build passes

* Fix phpcs issue on constructor

* Remove cache bypass added by mistake

* Improve changelog

* Fill date_paid and date_completed for refunds to avoid problems whem they are being used to sort
Fix unit tests when date_paid or date_completed are being used as sort date

* Change default to date_created

* Bump update script to 7.5.0

* Add prefix and postmeta variables for script
2023-02-17 10:29:36 -03:00
nigeljamesstevenson 3b58651bd6
Playwright 1.30.0 update (#36789) 2023-02-17 10:31:06 +00:00
nigeljamesstevenson e36d330afa
E2e/update command for e2e (#35287) 2023-02-17 10:28:15 +00:00
Chi-Hsuan Huang ad2f126a32
Have "Grow your store" appear first in marketing task by default (#36826)
* Have "Grow your store" appear first by default

* Add changelog

* Remove PLUGIN_LIST_DISPLAY_ORDER and use ALLOWED_PLUGIN_LISTS instead
2023-02-17 11:28:20 +08:00
Chi-Hsuan Huang dcba4456cf
Add SlotFill for marketing overview screen (#36828)
* Add slot for marketing overview section slotfill

* Add changelog

* Remove unneed changes

* Add changelog
2023-02-17 09:46:52 +08:00
Barry Hughes 28a6ed6656
Translate the labels for units of measure (#36708) 2023-02-16 17:16:30 -08:00
barryhughes 86005db0d1 Changelog 2023-02-16 10:23:59 -08:00
hsing 1c24708e25 Update cart form quantity and coupon code input style 2023-02-16 10:19:35 -08:00
Fernando Marichal ab6d3a45af
Show attribute creation form when there are no attributes (#36606)
* Add attribute creation form

* Add changelog

* Check `Used for variations` by default

* Fix lint

* Fix lint

* Fix `create-variable-product.spec` e2e tests

* Fix do not show form with local attributes

* Fix lint

* Fix tests

* Refactor e2e test fix

* Replaced `wp_kses_post` with `esc_html_e`

* Fix lint

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-02-16 10:52:12 -04:00
Peter Fabian 8ccfedfa4f Hardcoding the string instead of refering to value
...that's only available later or not at all in some contexts.
2023-02-16 15:16:56 +01:00
Peter Fabian 0c254c03c3 Switched matching of screen ID with the untranslated string. 2023-02-16 14:31:35 +01:00
Saad Tarhi cef5009a21 Run "pnpm --filter=woocommerce changelog add" 2023-02-16 11:34:40 +01:00
Saad Tarhi 469eb72766 Run composer update woocommerce/woocommerce-blocks 2023-02-16 11:31:19 +01:00
Saad Tarhi a6241d8bc7 Bump Woo Blocks version to 9.6.0 in composer.json 2023-02-16 11:29:11 +01:00
aniketpatel32 0e7c13d883
Fix: Ampersand changed to &amp on product attribute export #36520 (#36525) 2023-02-16 09:15:03 +01:00
Corey McKrill 23f52e040c
Update plugins/woocommerce/src/Utilities/I18nUtil.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2023-02-15 16:42:41 -08:00
Corey McKrill e016fb1093
Update plugins/woocommerce/src/Utilities/I18nUtil.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2023-02-15 16:42:10 -08:00
Corey McKrill 76e7260362
Clean up linting errors 2023-02-15 15:20:25 -08:00
Corey McKrill b336652e0d
Return the input string if it's not a recognized unit of measure
Rather than returning an empty string as the label for an unknown
unit of measure, this allows a merchant to use a custom unit of measure
for something and still have it appear in the UI.
2023-02-15 15:10:36 -08:00
Corey McKrill 9691159d09
Switch back to context-less gettext for unit translations
While the extra context would be beneficial for translators, these
particular strings have already been translated for many lanugages
and adding the context would invalidate the translations, which could
cause a visual regression for merchants if the new strings don't get
reapproved before the next version is released.
2023-02-15 14:12:17 -08:00
Nadir Seghir c28bb8708e fix function call 2023-02-15 16:58:26 +01:00
Nadir Seghir 2efe0a0f6a add tracking for local pickup 2023-02-15 16:41:26 +01:00
Atanas Penchev 55af1d1365
FlexSlider legacy browser code clean-up (#36690) 2023-02-14 12:08:07 +01:00
Nestor Soriano c4440b9586
Don't assume the character encoding parameter is present 2023-02-14 09:56:48 +01:00
Sam Seay e4303a7b25
Add smooth generator to the beta tester userscript (#36676) 2023-02-14 18:34:47 +13:00
Tomek Wytrębowicz c5cbc8d4ab
Update `config@3.3.7` (from `3.3.3`) (#33828)
* Update `config@3.3.7` (from `3.3.3`)

Add it to syncpack, to avoid `ReferenceError: node_env_var_name is not defined` when external extension imports and transforms the `admin-e2e-tests` directly from `node_modules`.

Include https://github.com/node-config/node-config/pull/642
2023-02-14 18:34:00 +13:00
Peter Fabian 906c84b85e
Make the "state" checkout field optional for BG and HU (#36701)
* Make state optional for BG and HU.

* Add changelog.

* PHPCS spacing fix

* Hide State field for Hungary.

* Unhide the State in Hungary.

Some extensions might still use it e.g. for shipping purposes.

* Merge branch 'trunk' into fix/hu-and-bg-state-optional
2023-02-13 15:45:54 -08:00
github-actions[bot] 2da44aea66
Delete changelog files based on PR 36624 (#36631)
Delete changelog files for 36624

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-02-13 14:18:36 -06:00
github-actions[bot] 19afaccb9d
Delete changelog files based on PR 36736 (#36744)
Delete changelog files for 36736

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-02-13 14:17:00 -06:00
github-actions[bot] 55fc851dba
Delete changelog files based on PR 36714 (#36717)
Delete changelog files for 36714

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-02-13 14:16:43 -06:00
github-actions[bot] 98f325c776
Delete changelog files based on PR 36456 (#36582)
Delete changelog files for 36456

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-02-13 14:16:22 -06:00
Corey McKrill 9eb6437d19
Remove opinionated styles from buttons in block themes so they inherit theme styles more accurately (#36651)
This PR removes several CSS lines that were enforcing specific styles (mostly padding) to buttons. This is in order to better inherit the styles provided by the theme.
2023-02-13 11:47:07 -08:00
Nestor Soriano 13a130fe37
Add changelog file 2023-02-13 17:24:08 +01:00
Nestor Soriano 2061778b3f
Add an encoding selector to the product importer 2023-02-13 17:22:48 +01:00
Ron Rennick 73a6475a3d
ensure unit test install ABSPATH is a real path (#36641)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-02-13 09:13:57 +01:00
Corey McKrill 5b27b02508
Fix linting issues 2023-02-08 22:44:24 +01:00
Jon Lane 4927dc0352 Changelog 2023-02-08 10:57:44 +01:00
Jon Lane f9f14f5b00 Update Playwright 1.28.0 -> 1.30.0 2023-02-08 10:52:54 +01:00
Jon Lane 3739c0869a Need to run config after starting 2023-02-08 10:31:16 +01:00
Jon Lane c8863ddb3c Incorporated feedback from review 2023-02-07 16:41:49 +01:00
Ahmed dc616bd4c6 update changelog 2023-02-07 11:14:40 +01:00
Ahmed 35384a4fe6 Fix decimal points for NOK 2023-02-07 11:10:59 +01:00
Jon Lane d5cf0b4fd5 Merge branch 'trunk' into e2e/update-command-for-e2e
# Conflicts:
#	plugins/woocommerce/tests/e2e-pw/README.md
2023-02-06 13:53:12 +01:00
Nazmul Hasan d525a56f68
Fix Typo in Variable Name on line 342
I've noticed on line 339 has an empty array ($attributes) which might be intended to use as a fallback variable for line 345. The array ($attributes) is then extended on line 342, but the variable name at this point is $attribute instead $attributes
2023-02-06 05:03:59 +08:00
Gan Eng Chin b717ce9645
Merge branch 'trunk' into feature/34906-marketing-channels-card 2023-02-04 02:33:01 +08:00
Albert Juhé Lluveras 4971eaa350 Increase TT2 styles specificity so they aren't overridden by block theme styles 2023-02-03 11:33:03 +01:00
Albert Juhé Lluveras 659566ed0d Fix variable products options and add to cart form not wrapping on different lines 2023-02-03 11:27:11 +01:00
Kevin Ruscoe 3828aabbef
clean up sass variable names (#28908) 2023-02-03 10:54:45 +01:00
Vedanshu Jain b5ae765b93 Use correct class name. 2023-02-03 14:17:54 +05:30
Vedanshu Jain c678ce7248 Remove get_from_datastore as it was not being used. 2023-02-03 14:14:26 +05:30
Corey McKrill a42eede13a
Add unit tests 2023-02-02 16:51:50 -08:00
Corey McKrill ad561d81bf
Update remaining labels for dimensions units 2023-02-02 16:33:43 -08:00
Seghir Nadir 7459aec50e
Bump WooCommerce blocks package to 9.4.3 (#36736)
* Update woocommerce-blocks to 9.4.3

* Add changelog file

---------

Co-authored-by: Jonathan Sadowski <sadowski@automattic.com>
2023-02-02 18:17:34 -06:00
Corey McKrill 54de988f25
Update labels for weight units 2023-02-02 16:08:44 -08:00
Moon 604ffe3fec
Mark purchase tests skipped temporarily (#36741)
* Mark tests skipped due to change in endpoint behavior

* Add changelog
2023-02-02 17:43:13 -06:00
Joshua T Flowers 89438cf873
Remove variations logic from the AttributeControl component (#36563)
* Move attribute data changes out of attribute control

* Move dynamic text to props

* Add onModalOpen callback

* Add onModal close prop

* Add changelog entry

* Use closeModal for edit attribute modal

* Add onEdit callback

* Extract util to get unique attribute id

* Rename editingAttribute to currentAttribute

* Rename showAttributeModal to isNewModalVisible

* Rename AddAttributeModal to NewAttributeModal

* Fix up handle add attributes

* Add onRemove callback for attibutes

* Fix up modal styling classes

* Fix up closing edit modal

* Fix up modal title for options

* Handle PR feedback

* Separate handlers for edit and new modal callbacks

* Update event names to be option/attribute specific

* Use default callback functions

* Handle PR feedback
2023-02-02 13:04:32 -08:00
Mahdi Taleghani 5d0c82f5c3
Change order of checkout address fields for Iran (#36491)
* add Iran country to get_country_locale

* create changelog file

* fix Code sniff convention for spacing
2023-02-02 10:58:49 -08:00
Gan Eng Chin c9214abe1f
Merge branch 'feature/34906-marketing-channels-card' into feature/34905-marketing-campaigns-card 2023-02-03 00:54:51 +08:00
Gan Eng Chin 67c09f63ea
Merge branch 'trunk' into feature/34906-marketing-channels-card 2023-02-03 00:53:21 +08:00
Gan Eng Chin 7bb042fcd2
Simplify CSS for CardHeaderDescription. 2023-02-02 21:50:36 +08:00
nigeljamesstevenson 7c84271ee2
update smoke test daily workflow to run api tests first (#36494) 2023-02-02 12:04:47 +00:00
Gan Eng Chin 048906ad80
Change Campaigns CSS to use @include font-size(). 2023-02-02 19:06:17 +08:00
Leif Singer d0a2b582fe
Consolidate eslint versions (#36700)
* pin eslint in .syncpackrc

run `pnpm run sync-dependencies` to ensure pinned version is used across projects, then run `pnpm install` to update `pnpm-lock.yaml`

* add changelog files

ran `pnpm run --no-bail --filter='[HEAD^1]' changelog add --significance=patch --type=dev --entry='Update eslint to 8.32.0 across the monorepo.'`

* re-run `pnpm install` to fix what broke while merging
2023-02-02 23:25:04 +13:00
Gan Eng Chin 7b068bf908
Code refactor for Campaigns card CSS. 2023-02-02 17:52:22 +08:00
Gan Eng Chin c17f336acc
Code refactor for Campaigns card. 2023-02-02 17:47:42 +08:00
Gan Eng Chin 0abe368962
Display error state in Campaigns card. 2023-02-02 17:17:29 +08:00
Barry Hughes 463082fb28
Revert/36294 (#36714)
* Revert "Update spelling of Cancelled to Canceled for US English. (#36294)"

This reverts commit e588c560bf.

* Changelog note
2023-02-01 13:59:42 -06:00
Gan Eng Chin 743c0e5085
Set per_page to 100 for getCampaigns.
100 is the maximum limit allowed by the API.

We do this because the API does not return total number of rows, so we use 100 to get "all" rows, to support pagination in the UI.
2023-02-02 01:03:15 +08:00
Gan Eng Chin 183fc48132
Show CardFooter and Pagination only when it is needed.
This means when total is more than perPage.
2023-02-01 20:29:32 +08:00
Gan Eng Chin eda6f194b9
Use perPage constant instead of literal 5. 2023-02-01 20:27:07 +08:00
Gan Eng Chin 274ea3dd60
Use Link component in Campaigns.
This allows fast client-side navigation.
2023-02-01 20:23:14 +08:00
Gan Eng Chin 29154425cb
Check description before rendering FlexItem.
This is to eliminate the unneeded flex gap when there is no description.
2023-02-01 20:17:53 +08:00
Gan Eng Chin c342cbb98d
Change to color variable in Campaigns CSS. 2023-02-01 20:09:17 +08:00
Gan Eng Chin cd7b5f2c96
Fetch and display campaigns with wp.data. 2023-02-01 19:02:03 +08:00
Corey McKrill cdff039569
Update products settings to use I18nUtil for unit labels 2023-01-31 17:26:14 -08:00
Corey McKrill 31d5b45443
Add changelog file 2023-01-31 17:16:32 -08:00
Corey McKrill 45069b1bf7
Update weight/dim formatting to use translated labels 2023-01-31 17:14:07 -08:00
Corey McKrill 21bae97e82
Add I18nUtil class 2023-01-31 17:12:11 -08:00
Corey McKrill f5bdbbaa20
Add i18n file for units 2023-01-31 17:11:27 -08:00
IanDelMar eeebcb9a6c
Properly deprecate woocommerce_my_account_my_orders_columns filter (#36356)
* Use WC_Deprecated_Filter_Hooks to deprecate filter

* Add changelog file

* fix since tag in comment

* Revert docblock changes
2023-01-31 13:02:42 -08:00
Marco Almeida 53f80a24f6
Allows developers to add their own filters to the active filters list
Fixes #36704
2023-01-31 19:02:17 +00:00
Gan Eng Chin 46adb0dc25
Rename Channels to RegisteredChannels. 2023-02-01 02:58:49 +08:00
barryhughes 4c427ef6da Changelog. 2023-01-31 09:56:43 -08:00
Gan Eng Chin 630bd0ab17
Merge branch 'feature/34906-marketing-channels-card' into feature/34905-marketing-campaigns-card 2023-02-01 00:52:48 +08:00
Gan Eng Chin f050bb79b5
Rename Channel to RegisteredChannel.
This is for better clarity and consistency.
2023-02-01 00:52:35 +08:00
Angelo Ghigi 09a1634bb2 Disable product info in Status Widget when stock management is disabled
There's no need to show the two products cells in Status Widget table when stock management is disabled, otherwise you'll get 2 links pointing nowhere (specific report pages are disabled and you'll get an "unauthorized" error)
2023-01-31 17:39:10 +01:00
Gan Eng Chin 177fc59dea
Simplify rendering code in MarketingOverviewMultichannel. 2023-02-01 00:29:38 +08:00
Gan Eng Chin 3384ad576d
Remove unused import. 2023-02-01 00:20:04 +08:00
Gan Eng Chin d69f7f00b7
Fix ids typescript error in Campaigns. 2023-02-01 00:18:53 +08:00
Gan Eng Chin 76102143ff
Merge branch 'feature/34906-marketing-channels-card' into feature/34905-marketing-campaigns-card
Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2023-01-31 23:50:03 +08:00
Gan Eng Chin d59e7e5721
Edit and arrange imports in MarketingOverviewMultichannel. 2023-01-31 23:39:02 +08:00
louwie17 5f0572664f
Add new `@woocommerce/product-editor` JS package (#36600)
* Bootstrap product-editor package

* Move product section components over to product editor package

* Add changelogs

* Remove unused import leftover from rebase
2023-01-31 09:38:28 -04:00
Joel Thiessen c080886262
Implementation of separate variant slots via refactored components (#36646)
* Adding contants, renaming files, wiring up shipping section with discrete slots for variants and non-variants

* Refactoring pricing section to give discrete slots for variant and non-variant forms

* Refactoring inventory fills to give discrete slots for variant and non-variant products

* Adding additional slot to pricing -> taxes -> advanced

* Renaming api fields component file

* Refactoring images, details and attributes to match others

* Ensure variant field IDs are distinct, organize all product field fill IDs

* Adding changelog

* Simplifying IDs used for slots

* Minor refactor of pricing taxes class field

* Give api fill exports their own registerPlugin scope

* Refactoring WooProductFieldItem to generate unique IDs

* Adding components changelog
2023-01-31 07:19:21 -04:00
Joshua T Flowers 83faf8d328
Add unique sku option to error data when setting product sku (#36612)
* Add unique sku option to error data when setting product sku

* Add changelog entry

* Add permalink template to the sku error data

* Revert "Add permalink template to the sku error data"

This reverts commit a49ee1d878.
2023-01-30 13:07:05 -08:00