Commit Graph

63100 Commits

Author SHA1 Message Date
Sam Seay e38ffc8427
Fix a typo in the SKU of sample products (#45208) 2024-03-02 15:55:01 +13:00
Jonathan Lane f538ff186b
Fix failing customer list test (#45261)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-03-01 15:03:28 -08:00
pintend bf84ed5bed
Fix for product meta lookup table incorrectly marking a product as onsale Closes #43008 (#43011)
* Update wc-product-functions.php

Determine if a product is on sale based on regular price, which is how its done in the WC_Product class 7122669d44/plugins/woocommerce/includes/abstracts/abstract-wc-product.php (L1633)

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

* added missing placeholders

* Update 43011-patch-1

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

* Re-trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2024-03-01 18:10:24 -03:00
Moon e8b633f6b9
Add launch_your_store feature flag (#45231)
* Add launch_your_store feature flag

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

* Update plugins/woocommerce/client/admin/config/core.json

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

* Update plugins/woocommerce/client/admin/config/development.json

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-03-01 12:21:18 -08:00
Jonathan Lane 0d63cf5f27
Minor updates to README (#45253)
* Minor updates to README

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

* Fixed typo

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-03-01 10:06:51 -08:00
Veljko V e82533be25
Add new E2E test to existing test case for mini cart customization (#45248)
* Update existing mini cart test to cover customization

* Add changelog

* Include test for font size and weight
2024-03-01 18:55:36 +01:00
Seghir Nadir 914c801f52
Link to discussion in custom fields API (#45193)
* Link to discussion in custom fields API

This adds the discussion link in custom fields docs.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-01 16:44:34 +01:00
Chi-Hsuan Huang 1f27a9e877
Revert " Temporarily commented out failing date package test due to the February 29th issue" (#45239)
Revert " Temporarily commented out failing date package test due to the Febru…"

This reverts commit b471e51734.
2024-03-01 22:12:09 +08:00
Jonathan Lane 0cb1782342
Explicitly clear out customers before testing (#45229)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-03-01 15:03:03 +02:00
Corey McKrill 2f77de3f18
WC Admin: Ensure `is_super_admin` REST field contains the correct value (#45235)
* Ensure is_super_admin REST field contains correct value

Adds a user ID parameter to the is_super_admin() check so that it will
return the value of the specified user rather than the current user.

Fixes #42893

* Add changelog file
2024-03-01 12:18:51 +01:00
Jonathan Lane bf43cf7e37
Update workflow to use latest checkout actions (#45199)
* Update workflow to use latest checkout actions

* Update non-HPOS workflow as well

* Update additional actions

* Set a slow test threshold at 30 seconds (15 is default)

* Final action updates

* Slow tests has to be an object

* Pin external actions to commit

* Slow test threshold and max

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-29 18:58:28 -04:00
Moon da64238290
Add range operator in Remote Inbox Notification (#45201)
* Add range rule in Remote Inbox Notification

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

* Add range

* Add changefile(s) from automation for the following project(s): packages/php/remote-specs-validation, woocommerce

* Update README.md

* Fix lint errors

* Make sure right-hand is an array with two elemetns -- range

* Update README

* Lint fixes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-29 13:02:38 -08:00
Adrian Moldovan 72789656cf
[e2e tests blocks] Configure the number of shards for each matrix project (#45212)
* Reduce the shards from 5 to 2 for blocks e2e tests

* Include the workflow in paths

* More granular shard config

* Refine shards config
2024-02-29 11:50:17 -08:00
Adrian Moldovan 5401d143a4
Fix K6 tests run on PR merge to trunk (#45139)
* Update workflow to use the same setup as for PRs

* Skip K6 job is PR is not merged
2024-02-29 11:45:12 -08:00
Ron Rennick ccef3d22f8
clear out unneeded github files from block folder (#44895)
* clear out unneeded github files from block folder

* copy changelog to woocommerce folder

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-02-29 13:30:56 -04:00
Ron Rennick c84d9d944a
pin simple-git in syncpack (#44902)
* pin simple-git in syncpack

* update pnpm-lock for simple-git

* add changelog for json linting

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-02-29 13:30:24 -04:00
github-actions[bot] 987a8e6342
Delete changelog files based on PR 45135 (#45227)
Delete changelog files for 45135

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-29 18:03:41 +01:00
github-actions[bot] 686069eac7
Delete changelog files based on PR 45178 (#45223)
Delete changelog files for 45178

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-29 17:08:22 +01:00
Luigi Teschio a15f75c0a4
CYS: Override header and footer template parts (#45196)
* CYS: Override the header and footer

* fix unit test

* fix lint error

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

* fix opacity

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-29 15:32:44 +01:00
Jonathan Lane c66c31b5f1
Add customer list e2e tests (#45198)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-29 15:47:40 +02:00
Chi-Hsuan Huang b471e51734
Temporarily commented out failing date package test due to the February 29th issue (#45202)
* Temporarily commented out a test due to February 29th issue

* Add changelog

* Fix lint
2024-02-29 11:23:45 +08:00
Sam Seay 49dbebfd0f
Refactor review blocks e2e tests to remove redundant html templates and add more scenarios (#44880) 2024-02-29 15:43:59 +13:00
Jorge A. Torres 21efa92db4
Add custom order fields drop-down to custom fields metabox under HPOS (#44739)
This PR brings to HPOS the dropdown of custom fields that is available for regular posts in the WP admin edit screen.
This dropdown lists a selection of non-private meta keys from all other orders allowing easy re-use.

Fixes #44029
2024-02-28 17:00:53 -08:00
Moon 839ea67577
Add remote spec rule validator UI (#45099)
* Add Remote Spec Rule validator

* Add changelog

* Remove unused var

* Add remote spec validator

* Load composer autoload

* Remove remote spec validation
2024-02-28 15:47:15 -08:00
Paul Sealock 467d16f212
Settings Slotfills: Normalize registration to avoid conflicts (#45152) 2024-02-29 10:00:52 +13:00
Alex Jones b2dd17c0df
ci: fix type error in scan changes tool (#45119)
* chore: fix type error in scan changes tool

* chore: fix linting issue
2024-02-28 15:41:21 -04:00
Mat Lipe b160cab657
Fix Deprecated dynamic property errors in php 8.2 (#44896)
The `\WC_Checkout::create_order_line_items` method assigns values to properties of the `WC_Order_Item_Product` class which did not exist.

PHP Deprecated:  Creation of dynamic property WC_Order_Item_Product::$legacy_values

PHP Deprecated:  Creation of dynamic property WC_Order_Item_Product::$legacy_cart_item_key

Fixes #38857

---------

Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-02-28 16:32:32 +01:00
Néstor Soriano bfa3ffb125
Fix: LegacyProxy::get_instance_of throws when trying to get an instance of a non-Woo namespaced class (#45178) 2024-02-28 16:31:25 +01:00
Patricia Hillebrandt 535d09730e
Update the copy for the terms and conditions on WooCommerce. (#44449)
* Update the copy for the terms and conditions on WooCommerce.

* Remove the closing round brackets

* Add changelog for: Update the copy for the terms and conditions on WooCommerce

* Update the snapshot test

* improve label for woo.com tracking setting

* update snapshot

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2024-02-28 15:57:57 +01:00
Luigi Teschio e4574e2681
CYS - Core: fix font load when user opts out of tracking (#45185)
* CYS - Core: fix font load when user opts out of tracking

* remove comment

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

* fix array to pass to FontFamiliesLoader

* fix crash

* fix font pair selected after the setup

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-28 14:47:31 +00:00
Adrian Moldovan 63f6650759
[e2e tests] Improve execution time by disabling the welcomeGuide feature instead of waiting for the modal (#45132)
* Fix locator for command palette

* Add changelog

* Use fixtures instead of before/after hooks

* Disable welcome modal

* Remove describe block

* Replace closeWelcomeModal with disableWelcomeModal

* Remove wait for networkidle

* Wait for page load

* Add changelog
2024-02-28 10:35:10 -04:00
Corey McKrill d581512171
Logging: Improve compatibility with multisite (#44735)
* Add static method for getting the log directory

* Add filter for customizing the log directory path

* Handle case where constant is already defined

* Do directory creation on the fly instead of during install

* Replace all Core usages of WC_LOG_DIR

* Ensure each site's log handler setting is respected

* Add unit tests

* Fix legacy logger unit tests

* Update docs

* Regenerate docs manifest file (required by GitHub CI)

---------

Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2024-02-28 12:31:31 +01:00
Alba Rincón e1d83555a2
[CYS] Add missing typography settings for the Site Title block (#45166)
* Add missing typography settings for the Site Title block

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

* Remove unnecessary fontStyle attribute

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-28 12:06:39 +01:00
Karol Manijak d833e92f05
Fatal error when using Product Stock Indicator or On Sale Badge blocks on a homepage (#45135)
* Prevent accessing product if there's no product yet in ProductStockIndicator block

* Prevent accessing product if there's no product yet in ProductSaleBadge block

* Add changelog

* Fix linter
2024-02-28 10:34:37 +01:00
Karol Manijak 382bcdf511
Pass some context information to `woocommerce_blocks_hook_compatibility_additional_data` hook (#45156)
* Pass additional context to the woocommerce_blocks_hook_compatibility_additional_data hook which is a class name in which it was called

* Add changelog

* Lint fixes
2024-02-28 10:34:07 +01:00
Jorge A. Torres c83b030834
Make dashboard status widget compatible with HPOS (#44734)
* Remove unnecessary import

* Make top seller query compatible with HPOS

* Add compat `get_count_for_type()` method

* Make dashboard widget compatible with HPOS

* Add changelog

* PHPCS fixes

* Add unit test

* PHPCS — we meet again.
2024-02-28 11:40:33 +05:30
Albert Juhé Lluveras b95c15fc2f
Refactor BlockTemplatesController (#44537)
* Cleanup BlockTemplatesController constructor

* Remove unnecessary elseif

* Remove unnecessary param comment

* Move Single Product Template responsibilities to the SingleProductTemplate.php file

* Move Mini-Cart Template reposnibility to the MiniCartTemplate.php file

* Create the other template files

* Code cleanup

* Move template redirect into template files

* PHP cleanup

* Add changelog entry

* Fix PHP tests

* Replace hardcoded 'archive-product' slug with ProductCatalogTemplate::SLUG

* Make it so AbstractTemplatePart extends AbstractTemplate

* Register templates in BlockTemplatesRegistry

* Fix slug usage in AbstractPageTemplate.php

* Add get_template_title and get_template_description methods to AbstractTemplate

* Cleanup

* Make init functions protected in template classes

* Avoid using static constants and methods in BlockTemplatesRegistry

* Avoid using static constants and methods in block template classes

* Fix lint errors

* Fix Single Product classes not being applied

* Fix tests

* Get BlockTemplatesRegistry directly from BlockTemplateUtils to simplify code

* Init BlockTemplatesRegistry and BlockTemplatesController from Bootstrap.php

* Fix wrong static::SLUG call

* Init template classes from BlockTemplatesRegistry

* Revert "Fix wrong static::SLUG call"

This reverts commit 866c9b913a.
2024-02-27 19:05:25 +01:00
Barry Hughes 241b860b9f
Remove test/debug comment. (#44588)
* Remove test/debug comment.

Clearing this up also means linting passes for this file :-)

* Changelog.

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

* Remove extra changelog (deconflict with CI changelog tool).

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-27 13:50:55 -03:00
Patricia Hillebrandt 67f0d75b16
[CYS on Core] Add the color palettes for the Nokul, Highline and Luminate themes in the Intro Screen (#45105)
* Add the color palettes for the highline theme.

* Add the color palettes for the luminate theme.

* Add the color palettes for the nokul theme.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-27 16:01:58 +01:00
Niels Lange a668cf942e
Add e2e tests for notice templates (#44612)
* Add e2e tests for notice templates

* Add changelog entry

* Minor refactor

* Remove child theme zip files

* Generate child theme zip files on the fly
2024-02-27 13:46:31 +01:00
nigeljamesstevenson 7ad4ef8e4d
Update test-assistant-release-highlight-tracker.yml 2024-02-27 12:26:37 +00:00
Tomek Wytrębowicz c0750d5567
Move rendering of Order Attribution inputs fully to JS (#44335)
- Define custom element for order-attribution
   to move DOM manipulations to JS only.
   To support multiple checkout & register forms on the same page.

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-02-27 12:31:37 +01:00
Moon 49b3e510cb
Allow JSON schema string (#45151)
* Receive JSON schema string from the constructor -- this is more flexible than accpeting a physical file

* Add changelog

* Add get_bundle_json method

* Update composer version
2024-02-27 00:34:41 -08:00
Alba Rincón 27ee0fd9d1
[CYS] Update path to intro when exiting the assembler (#44771)
* Update path to intro when exiting the assembler

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

* Fix styling

* Fix linting error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-27 09:28:24 +01:00
Chi-Hsuan Huang ec8bd31365
Improve webpack cache-busting version parameter by using file contents hash (#44838)
* Update webpack config to use file content hash for chunks and generate asset php for styles

* Use StyleAssetPlugin to generate style.asset.php

* Remove unneed ?ver=<version> code

* Use file hash from asset file when SCRIPT_DEBUG is off

- Use file hash to load scripts/styles ?ver=<file hash>
- Add register_style() method to WC_Admin_Assets

* Load payment method promotions in admin_enqueue_scripts

* Add changefile(s) from automation for the following project(s): @woocommerce/product-editor, woocommerce

* Add json2php

* Update doc

* Update pnpm-lock.yaml

* Fix add_print_shipping_label_script

* Add a comment to style-asset-plugin.js

* Change register_style to use WC_ADMIN_DIST_CSS_FOLDER

* Reset the outputNormal object to avoid duplicate files

* Fix type error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-27 08:07:53 +00:00
Chi-Hsuan Huang 707c555091
Reduce calls to wp_count_posts( 'product' ) from OnboardingTasks (#45125)
* Reduce product count calls via transient caching

* Check has_previously_completed first

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-27 05:30:55 +00:00
Chi-Hsuan Huang ef16260d6e
Cache marketing task is_complete() method result (#45126)
* Cache marketing task is_complete() method result

* Add changelog
2024-02-27 13:12:22 +08:00
Sam Seay 279cca118c
Fix broken import path that causes e2e to fail (#45153) 2024-02-27 18:03:56 +13:00
Adrian Moldovan e1cae6d175
[e2e tests] Tests for product attributes in product blocks editor (#44777)
* Remove describe blocks and duplicated page fixture

* Add test `can update sku`

* Add changelog

* Finish test 'can update sku'

* Add test 'can update stock status'

* Add test 'can track stock quantity'

* Add test 'can limit purchases'

* Remove extra whitespace

* Disable product editor tour

* Revert timeout update

* Add new test `can create product attributes`

* Add changelog

* Add new test 'can update product attributes'

* Configure actionTimeout

* Add 'can remove product attributes' test

* Tweak timeouts

* Add asserts for 'can create and add attributes'

* Add asserts for 'can add existing attributes'

* Add remaining asserts

* Revert config changes

* Move fixtures into fixture folder

* Move fixtures into fixture folder

* Fix missed fixtures imports

* Skip 'can update product attributes'
2024-02-26 16:20:56 -08:00
Adrian Moldovan 9a20444af7
[e2e tests] Fix command pallete test failing with Gutenberg active (#45121)
* Fix locator for command palette

* Add changelog

* Use fixtures instead of before/after hooks

* Disable welcome modal

* Remove describe block

* Move function to avoid a future merge conflict
2024-02-26 14:16:55 -04:00