Commit Graph

62883 Commits

Author SHA1 Message Date
Chi-Hsuan Huang eb2b1fef1d
Add checks and unit tests to rule processors (#44448)
* Add checks and unit tests to rule processors

* Add checks and unit tests to PluginsActivatedRuleProcessor

* Add checks and unit tests to PluginsVersionRuleProcessor

* Add checks and unit tests to PublishAfterTimeRuleProcessor

* Add checks and unit tests to PublishBeforeTimeRuleProcessor and fix PublishAfterTimeRuleProcessor

* Add checks and unit tests to WCAdminActiveForRuleProcessor

* Add unit tests and refactor TotalPaymentsVolumeProcessor

* Fix unit tests

* Add changelog

* Fix unit tests

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/base-location-state-rule-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/wcadmin-active-for-rule-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/wcadmin-active-for-rule-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/wcadmin-active-for-rule-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/wcadmin-active-for-rule-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/total-payments-volume-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/is-woo-express-rule-processer.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/is-woo-express-rule-processer.php

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

* Use Throwable instead

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/total-payments-volume-processor.php

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

* Update plugins/woocommerce/src/Admin/RemoteInboxNotifications/BaseLocationCountryRuleProcessor.php

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>

* Update plugins/woocommerce/src/Admin/RemoteInboxNotifications/PluginsActivatedRuleProcessor.php

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/plugin-version-rule-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/publish-after-time-rule-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/publish-before-time-rule-processor.php

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

* Update plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/remote-inbox-notifications/total-payments-volume-processor.php

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

* Address PR feedback

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
2024-02-16 10:10:15 +00:00
Tung Du 0425857b7f
[Experimental] Fix Active Filter chips style (#44682) 2024-02-16 10:09:49 +00:00
Chi-Hsuan Huang 75118fbe40
Add checks and unit tests to Transformers (#44634)
* Add checks and unit tests to Transformers

* Add changelog

* Update docs

* Fix test

* Set the default value to an empty array

* Set default value to array() for ArrayColumn
2024-02-16 16:51:09 +08:00
Ilyas Foo 0ea64cf93b
Add error handling and tests for ShippingPartnerSuggestions (#44641)
* Add error handling and tests for ShippingPartnerSuggestions, add missed generic error handling for RemoteFreeExtension evaluator

* Changelog
2024-02-16 15:18:30 +08:00
Vedanshu Jain 1d91b89d16
Dont render attribution metabox for non-supported order types. (#44680)
* Dont render attribution metabox for non-supported order types.

* Use a screen check instead of order type check for better compat.

* phpcs fix

* Remove unnecessary call.
2024-02-16 12:39:25 +05:30
Manish Menaria 017b5e249a
Product Collection: Handle empty block content in process_pagination_links method (#44575)
* Handle empty block content in process_pagination_links method

This commit introduces a check for empty block content in the `process_pagination_links` method of the `ProductCollection` class. This change ensures that if the block content is empty, the method will immediately return the original content without attempting further processing. This enhancement prevents potential errors or unnecessary processing steps on empty content.

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-16 11:35:59 +05:30
Sam Seay f513ce7c25
[Experimental] Refresh product collections that don't support the interactivity API (#44631) 2024-02-16 15:51:42 +13:00
ericmulder 4cf4868855
fix fatal string to array conversion error in get_full_size_image_dim… (#40395)
Ensures that even if `wp_get_attachment_metadata` returns an unexpected value due to a filter, the `get_full_size_image_dimensions` method will handle it correctly and not throw an error.

Fixes #40393

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-02-15 15:45:10 -08:00
Adrian Moldovan ddf908d7fb
[e2e tests] Enhance product reviews tests (#44644)
* Rename test

* Updated tests to use work with more reviews

* Add changelog

* Add new test: can filter the reviews by product

* Fix lint errors and warnings
2024-02-15 13:30:47 -08:00
Jonathan Lane fce80c40c0
E2e/customer emails (#44622)
* Adds tests for user account emails

* Add changelog

* Fix linting issues (code formatting)

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-15 13:07:31 -08:00
nigeljamesstevenson a0b72b0546
Cherry-pick #301 into trunk (#44667)
Checkout changes from #293

Co-authored-by: Rodel Calasagsag <rodel.calasagsag@automattic.com>
2024-02-15 21:06:37 +00:00
nigeljamesstevenson 45fd1ab3f0
Cherry-pick #298 into trunk (#44666)
* add wc_get_valid_product_statuses

* add support for sku

* add unit tests for the `product_page` shortcode

* add `woocommerce_shortcode_product_page_override_read_permissions_unpublished` filter

* keep a list of invalid statuses instead of valid ones and allow overriding it

* move deprecation notice handling into methods

* appease the linter

* remove `visibility` attribute

* ensure we remove the filters that we add in a test

* allow overriding read permissions in both directions (or not at all)

* add sku-based tests and remove some superfluous testing data and asserts

* add back in missing variable

* remove superfluous `hidden` visibilities

* add changelog file

---------

Co-authored-by: Leif Singer <git@singer.sh>
2024-02-15 21:06:25 +00:00
nigeljamesstevenson 58781b796c
Cherry-pick #295 into trunk (#44665)
* Prevent file-sniffing through the product editor's downloadable files UI.

Before now, files that do not exist and files that exist outside an approved directory led to different error messages. This meant the latter could be taken as an indicator that a given file exists.

* Correct initial indent.

---------

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2024-02-15 21:06:14 +00:00
Ron Rennick 5ec07c1e5f
update states, expected plugins in api tests (#44650)
* update states, expected plugins in api tests

* add changelog

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-02-15 14:22:24 -04:00
Jonathan Lane 2812adc5af
Add sharding to Blocks e2e tests (#44440)
* Add sharding to Blocks e2e tests

* Changelog

* Push a change to Blocks README to trigger tests

* Fix syntax

* Fixed again

* Try again

* Trying to get the shard number

* Shard names

* fix E2E test

* complete all the jobs

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2024-02-15 09:27:17 -08:00
Alexandre Lara 452c522b95
[DOC] Resolve incorrect branch references in Gutenberg links (#44566)
* Fix Gutenberg links in the docs pointing to the wrong branch

* Add changefile(s) from automation for the following project(s): @woocommerce/notices, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/components, woocommerce-blocks, woocommerce-beta-tester, woo-ai

* Fix markdown lint errors

* Fix wrong link in the docs

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-15 14:13:28 -03:00
Jorge A. Torres f79bf3a340
Add `wc hpos backfill` tool to backfill from/to either datastore (#44281)
* Fix docblock

* First pass at backfill CLI tool

* Use ‘posts’ instead of ‘cpt’ in legacy data handler

* Include posts to HPOS migrator in LegacyDataHandler

* Add backfill method to legacy data handler

* Add tests

* Add changelog

* Appease linter

* Rename <id> to <order_id> in WP-CLI docblock

* Make from/to datastore argument mandatory

* Improve handling of invalid order types

* PHPCS fixes
2024-02-15 08:13:23 -08:00
Adrian Moldovan 729bc437fc
Revert "Skip e2e tests for not relevant changes (e.g. docs)" (#44645) 2024-02-15 17:56:42 +02:00
Thomas Roberts c7eb05ac5e
Remove Additional Checkout Fields entry from 8.5 changelog (#44642) 2024-02-15 06:46:48 -08:00
Alba Rincón 7440082381
[CYS on Core] Update image to have a better resolution (#44611)
* Update image to have a better resolution

* Add changelog
2024-02-15 14:28:24 +01:00
Alba Rincón c9fe049934
[CYS - Core] Update the subheading copy of the transitional page (#44603)
* Update the subheading copy of the transitional page

* Add changelog
2024-02-15 13:59:43 +01:00
Justin Palmer b439a01cd5
Add mobile app order attribution source (#44519)
* Add mobile_app order attribution source
2024-02-15 13:44:02 +01:00
Fernando Marichal f09bc85875
Fix pre-publish modal styles (#44562)
* Fix pre-publish modal styles

* Improve styles

* Add changelog

* Add vars to styles

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/style.scss

* Fix sidebar styles

* Add changelog

* add overflow auto

* Fix quotes
2024-02-15 09:36:59 -03:00
Justin Palmer 406dcac669
Order attribution - avoid attributing AJAX-checkouts to Web Admin (#44219)
* Ensure is_admin AND ! wp_doing_ajax for setting Web admin source

* Better control to permit possible wp-admin ajax order creation
2024-02-15 12:38:09 +01:00
Albert Juhé Lluveras dd56a3ba61
Clean up block templates after running e2e tests (#44600)
* Clean up block templates after running e2e tests

* Add changelog entry

* Fix linting
2024-02-15 08:17:12 +01:00
Viktor Szépe 49557b3229
Fix reference to WC_API_Server (#37054)
* Fix reference to WC_API_Server

* Add changelog
2024-02-15 07:14:36 +00:00
RJ 141c2e4399
add/explat experiment name validation (#44535) 2024-02-15 12:35:23 +08:00
Barry Hughes 94c0578029
Session handler: restore use of _table property, for consistency with other methods. (#44517)
* Restore use of _table property, for consistency with other methods.

* Ignore interpolated/unprepared variable warning (we're referencing a table name).
2024-02-14 19:22:53 -08:00
Chi-Hsuan Huang a5711d03ca
Improve remote specifications transient handling and error management (#44384)
* Add set_specs_transient helper method

* Store default specs into transient when spec rules fails

* Add changelog

* Fix automatic conversion of false to array is deprecated

* Update plugins/woocommerce/src/Admin/DataSourcePoller.php

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

* Use set_specs_transient

* Handle evaluation error properly

* Add unit tests

* Update init

* Update changelog

* Update changelog

* Update plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/EvaluateSuggestion.php

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

* Change expires time compare operator to <= for safety

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-02-15 11:00:36 +08:00
Kazuto Takeshita 71b6e74615
Make the structured data price of group products refer to the latest child product price (#42808)
* Changed Make the structured data price of group products refer to the latest child product price.

* Add changelog

* PHPCS fixes

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-02-15 02:58:21 +00:00
Jonathan Lane c3b355a53f
Remove test publishing (#44592) 2024-02-14 16:41:11 -08:00
nigeljamesstevenson 83fc7a88f3
Update Action Scheduler to 3.7.2 (#44628)
* Update Action Scheduler to 3.7.2
2024-02-14 16:28:02 -08:00
Paul Sealock 0f27449454
Update states.php -> Add Morocco regions (#41769)
Add regions for Morocco according to CLDR.
2024-02-14 16:17:09 -08:00
Christopher Allford eb543f564f
Fixed `@woocomerce/classic-assets` Watch Command (#44627)
The `watch:build` setup in this package does not conform to
the expects format and so the build command was not being
run. This fixes that and ensures it gets executed correctly.
2024-02-14 15:53:14 -08:00
Thomas Roberts 1ddd904b26
Add additional checkout fields documentation (#43782)
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-02-14 13:48:03 -08:00
Ron Rennick 16c8ec397c
fix label typo added in #44561 (#44618)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-02-14 11:10:03 -08:00
Mike Jolley b94c14e745
[Experiment] Fix additional address field validation notices (#44615) 2024-02-14 10:02:30 -08:00
Maikel Perez 5af88543eb
Add the collapsible Schedule section (#44563)
* Create schedule section within the pre-publish panel component

* Add publish date time picket to the schedule section

* Enhance schedule section title to show the selected date

* Change the text of the publish button to schedule once the product is scheduled

* Add changelog file

* Fix linter errors

* Set schedule text in pre publish button too

* Fix timezone offset from getSiteSettingsTimezoneAbbreviation when the onboarding wizard is skipped
2024-02-14 13:57:53 -03:00
Paul Sealock 4061bbfc2b
Changelog Auto Add script: Fix property chaining (#44570)
Fix property chaining
2024-02-14 11:04:56 -04:00
Matt Sherman d279466eb3
[Product Editor] Fix blank editor flash when loading product (#43840)
* EditorLoadingContext

* Use EditorLoadingContext

* Remove fallbacks

* Make sure metadata exists before using it

* Add header loading state

* Do not return skeleton

* Use EditorLoadingContext

* Update editor loading state

* Remove ProductPageSkeleton

* Remove unused import

* Remove unused import

* Handle undefined variationId and parentId in VariationSwitcherFooter

* Remove ProductPageSkeleton

* Include productId in determination of whether editor is loading

* Handle variation loading

* Fix rebase merge conflict mistakes

* Fix layout margins

* Show welcome tour and feedback bar after editor has loaded

* Changelogs

* Make loading context experimental
2024-02-14 09:57:17 -05:00
Bart Kalisz 2432b3b22e
[E2E] Update the blocks E2E setup guide (#44468)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-02-14 16:00:52 +02:00
nigeljamesstevenson fd24ff80e0
Delete plugins/woocommerce/changelog/kevinbates-patch-1-1
File removed as part of actioning CFE pf59Ax-L1-p2
2024-02-14 13:36:42 +00:00
Alba Rincón bf938b0bd3
[CYS] Update `Hero product chessboard` pattern (#44553)
* Reduce the `woocommerce-customize-store-banner-content` width to better fit the copy

* Add changelog

* Remove the image placeholder and improve margins

* Add changelog
2024-02-14 14:28:40 +01:00
Ilyas Foo c0804827a4
Improve tasklist performance, add prop to track (#44442)
* Improve tasklist performance, add prop to track

* Changelog

* Lint
2024-02-14 21:17:08 +08:00
Ilyas Foo 8ba2942099
Fix type handling and default value for remote API transformers (#44418)
* Add default value check and parameter, change transformer behaviour around defaults and types, update and add tests

* Changelog
2024-02-14 21:16:39 +08:00
Alba Rincón e5e641180b
Update the `Product gallery` pattern title (#44604)
* Update the product gallery title

* Add changlog
2024-02-14 13:55:33 +01:00
github-actions[bot] e00f49a0b1
Delete changelog files based on PR 44526 (#44608)
Delete changelog files for 44526

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-14 13:19:22 +01:00
github-actions[bot] d12cc1a770
Delete changelog files based on PR 44318 (#44606)
Delete changelog files for 44318

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-14 11:46:04 +00:00
Alba Rincón 0e1239867a
[CYS] Reduce the width of the "Design your own" text box on the Intro screen (#44546)
* Reduce the `woocommerce-customize-store-banner-content` width to better fit the copy

* Add changelog

* Increase the width to fit the sentence in one line
2024-02-14 11:44:41 +01:00
Justin Palmer 754779e00e
Simplify Customer history calculation (#44318)
* Only show customer history box if WooCommerce Analytics are enabled

* Use requests to /reports/customers endpoint for customer history data

* Don't reinvent the wheel - use customer analytics data for Cust. Hist.

* Remove Customer Order Count from tracks data

* Simplify the customer history process

* Omit Customer history content when adding a new order in wp-admin

* Early return to reduce complexity

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>

* Simplify matching customers

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>

* Remove unnecessary method

* Use Customers Query directly to get customer history data

* Template version bump

* Move the customers query to CustomerHistory

* Only show customer history box if WooCommerce Analytics are enabled

* Use requests to /reports/customers endpoint for customer history data

* Don't reinvent the wheel - use customer analytics data for Cust. Hist.

* Remove Customer Order Count from tracks data

* Simplify the customer history process

* Style and legibility fixes

* Template version bump

* Add changelog

* Omit Customer history content when adding a new order in wp-admin

* Early return to reduce complexity

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>

* Simplify matching customers

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>

* Remove unnecessary method

* Use Customers Query directly to get customer history data

* Template version bump

* Move the customers query to CustomerHistory

* Match default params

* Simplify Customer Query params (cache key match with API is much harder)

---------

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>
2024-02-14 11:38:10 +01:00