Commit Graph

20109 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Adrian Moldovan a435f5cafa
[e2e tests] Fix page conversion failing in global setup (#45129)
Filter pages by slug
2024-02-26 13:20:17 -04:00
Patricia Hillebrandt fe0b918058
[CYS on Core] Conditionally change the default fonts available based on user consent (#44532)
* Add upgrade notice for the fonts feature whenever WP is outdateed or the user did not grant us consent.

* Add styles for the woocommerce-customize-store_sidebar-typography-upgrade-notice class.

* Update the upgrade conditionals.

* Introduce the new modal for the user to opt in to usage tracking.

* Add the CSS for the woocommerce-customize-store__opt-in-usage-tracking-modal

* Implement the sendEvent to OptInDataSharing

* Fix typo.

* Make sure the opt in button is disabled if the opt in checkbox is unchecked.

* Update the styles for the woocommerce-customize-store__opt-in-usage-tracking-modal

* Update the styles to allow changes to the link

* Set Cardo + System Sans-serif as the default fonts if the usage tracking wasn't allowed.

* Set Cardo + System Sans-serif as the default fonts if the Font Library is unavailable.

* Add the Jost + Instrument Sans font pairing.

* Update copy for the upgrade notice to remove mentions to Gutenberg.

* Replace the Link component with the Button component.

* Ensure the woocommerce_allow_tracking option is properly updated whenever the user opts in.

* Add the new Inter + Cardo font pairing.

* Redirect user to the loading screen so all relevant fonts can be installed for them.

* Render the FontPairing component only if the isFontLibraryAvailable. Update the link to download the latest version of the core of WordPress.

* update the fontPairings constant.

* Update styles for buttons and links.

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

* Make sure the dispatch for updating the option is async so the page redirect is not triggered before the option is saved to the database.

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
2024-02-26 16:01:43 +01:00
Patricia Hillebrandt ce33c84222
[CYS on Core] Display a new modal informing the theme switch whenever the user clicks on the "Start designing" button (#44821)
* Introduce the new theme switch warning modal.

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

* Remove the unnecessary CheckboxControl

* update the copy & replace 'can' with 'could'

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 13:53:02 +00:00
Veljko V 9a1d11c1ba
Update mini cart test to include increased max quantity scenario (#44921) 2024-02-26 13:40:44 +00:00
Alexandre Lara 9d57f891eb
With Product Variations HOC > Convert to TypeScript (#44785)
* Add with-product-variations.tsx

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

* Add types for ProductVariationItem

* Fix ESLint errors

* Remove JS file

* Replace Product with ProductResponseItem interface

Initially, a Product interface was created to add the required types; however,
it was pointed out that the @woocommerce/types alias already provided an interface
for products (the ProductResponseItem interface).

* Remove returning types definition

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 10:26:21 -03:00
Nitish Upadhyay-1176 9a046ea285
Update collections.md (#45118)
* Update collections.md

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 13:36:05 +01:00
Veljko V 86f0ac9852
Add new E2E shop test filtering products by price (#44516) 2024-02-26 14:30:57 +02:00
Fernando Marichal 3d3f6d64b8
Add `Always show pre-publish checks` checkbox (#44595)
* Add show-prepublish-checks-section

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

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

* Add show-prepublish-checks hook

* Refactor prepublish panel button visiblity

# Conflicts:
#	packages/js/product-editor/src/components/header/header.tsx

# Conflicts:
#	packages/js/product-editor/src/components/header/header.tsx

* Fix footer styles

* Add changelogs

* Add content div

* Fix styles

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

* Rename recorded action

* Fix styles

* Hide panel after unchecking option

* Improve resolving

* Add new E2E test for merchant transforming classic cart to cart block (#44926)

* Update the monorepo-utils gitignore to only include index.js and its license file. (#44932)

* Fixed `@woocommerce/plugin-woocommerce` Watch (#44930)

By default `nodemon` only watches for JS file changes. This expands the
config so that it watch the file extensions that are actually
produced by builds.

* Update core package.json to remove nightly ci config (#45096)

* Update core package.json to remove nightly ci config

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

---------

Co-authored-by: github-actions <github-actions@github.com>

* Update blocks build message (#44811)

* Update blocks build message

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

* Update plugins/woocommerce/src/Blocks/Domain/Bootstrap.php

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

* Update plugins/woocommerce/src/Blocks/Domain/Bootstrap.php

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

* [CYS on Core] Update the themes list on the intro screen (#44822)

* Update themes list on core. Update the themes data and remove hardcoded reference to free themes.

* Update styles for the Free, Paid and active cards.

* Add the color palletes to TT4 theme.

* Update the references for default and core themes.

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

* Update the link to TT4 theme

* Update default value for price.

---------

Co-authored-by: github-actions <github-actions@github.com>

---------

Co-authored-by: Veljko V <veljano@yahoo.com>
Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2024-02-26 07:38:48 -04:00
Albert Juhé Lluveras 3d045a13bb
Update usages of WooCommerce Blocks version checks (#44804)
* Update usages of WooCommerce Blocks version checks

* Add changelog file

* Undo methods deprecation
2024-02-26 12:09:47 +01:00
otrocodigo b05082ae87
Fixed errors in file documentation syntax. (#44629)
* Fixed errors in file documentation syntax.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 17:43:22 +08:00
Alba Rincón 24663293ac
[CYS] Update footer and homepage copy (#44800)
* Update assembler sidebar link when no AI available

* Update the sidebar section title depending on the flow

* Revert unnecessary changes

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

* Add missing text domain

* Fix test

* Tweak the footer section copy

* Update the design homepage section description

* Chage footer description only on Core

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

* Update copy

* Fix code duplication

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 10:15:02 +01:00
Alba Rincón af00debc02
[CYS] Use outline instead of border, so the border width does not affect the card size (#44851)
* Use outline instead of border, so the border width does not affect the card size

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 10:14:47 +01:00
Alba Rincón c17799806d
[CYS] Mark the products task as completed only if products were user created (#44890)
* Mark the products task as completed only if products were user created

* Consider the edited products as user products

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-26 10:14:29 +01:00
Karol Manijak 4b69fc7b84
Improve the Compatibility Layer docs to minimise confusion (#44924)
* Improve the Compatibility Layer docs to avoid confusion

* Add changelog

* Add punctuation
2024-02-26 09:03:03 +01:00
github-actions[bot] 47de1ba6ff
Prep trunk for 8.8 cycle (#44910)
Prep trunk for 8.8 cycle with version bump to 8.8.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-26 07:45:24 +01:00
github-actions[bot] bf0f14d324
Release: Remove 8.7 change files (#44911)
Delete changelog files from 8.7 release

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-26 07:45:02 +01:00
Patricia Hillebrandt e74199928d
[CYS on Core] Update the themes list on the intro screen (#44822)
* Update themes list on core. Update the themes data and remove hardcoded reference to free themes.

* Update styles for the Free, Paid and active cards.

* Add the color palletes to TT4 theme.

* Update the references for default and core themes.

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

* Update the link to TT4 theme

* Update default value for price.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-25 19:56:10 +00:00
Roy Ho c2b1433b35
Update blocks build message (#44811)
* Update blocks build message

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

* Update plugins/woocommerce/src/Blocks/Domain/Bootstrap.php

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

* Update plugins/woocommerce/src/Blocks/Domain/Bootstrap.php

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
2024-02-23 13:43:15 -08:00
jonathansadowski d660f0c272
Update core package.json to remove nightly ci config (#45096)
* Update core package.json to remove nightly ci config

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-23 16:40:04 -04:00
Christopher Allford baafc35dd5
Fixed `@woocommerce/plugin-woocommerce` Watch (#44930)
By default `nodemon` only watches for JS file changes. This expands the
config so that it watch the file extensions that are actually
produced by builds.
2024-02-23 12:09:47 -08:00
Veljko V 7018f2b7f3
Add new E2E test for merchant transforming classic cart to cart block (#44926) 2024-02-23 19:51:08 +02:00
Bart Kalisz 8b4bacc2bf
[E2E] Refactor blocks global setup (#44843) 2024-02-23 11:17:46 +01:00
Alexandre Lara 56e6772af5
Reviews by Product > No Reviews Placeholder: Refactor component from JavaScript to TypeScript (#44664)
* Refactor No Reviews Placeholder component from JavaScript to TypeScript

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

* Fix file import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-22 22:23:53 -03:00
Alfredo Sumaran f4bccaae43
Apply Rector suggestions for PHP 8.1 (#43233)
* PHP8 fixes for src/Admin

* Add changelog entry

* Fix PHP Lint issues
2024-02-22 15:37:45 -08:00
Brent MacKinnon 4f24fdcabb
Update logging.md (#44908)
* Update logging.md

* Add changelog file

* Update docs manifest file

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-02-22 23:30:08 +00:00
Adrian Moldovan e5ebc61d81
[e2e tests] Fix a flaky product inventory test (#44897)
Clear the field before filling the new value and use another value than the default one.
2024-02-22 16:10:55 -04:00
Adrian Moldovan b88a094289
[e2e tests] Configure timeout for action and navigation (#44891)
* Add timeouts for action and navigation

* Add changelog
2024-02-22 09:55:54 -08:00
Adrian Moldovan 54ad039310
Remove mariaDB image tag workaround (#44881)
* Remove sed commands in postinstall

* Add changelog
2024-02-22 09:53:58 -08:00
And Finally 24a216f887
Fix promotions filtering by tab (#44884)
* Fixing filtering by tabs in `Promotions` component.
Using reference to WC_Admin_Marketplace_Promotions::TRANSIENT_NAME when outputting JS data for promotions, instead of transient string.
Better initialisation of wc global object in the inline script.

* Changelog.

* Using global var for marketplace.

* More tentative reference to global object.

* icon TS error
2024-02-22 16:35:46 +00:00
And Finally 0a3c285b08
Update example plugin for Activity Notes to include namespacing (#44504)
* Updates example plugin for Activity Notes to include namespacing of `Automattic\WooCommerce\Admin\Notes\Note` and `Automattic\WooCommerce\Admin\Notes\Notes`. Without this, the example doesn't work in `wp-content/plugins`.

* Added changelog.
2024-02-22 14:16:03 +00:00
And Finally a0ac7ffecc
In-App Marketplace: record page views at the end of the `useEffect` hook (#41604)
* Moves calls to `recordMarketplaceView` and `recordLegacyView` to the `finally` of the `useEffect` in the Content component. Calling these functions at the top of the hook is recording a view for the default screen and then a view for the My Subscriptions screen when you go directly to My Subscriptions.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-22 14:15:10 +00:00
Alexandre Lara a3c9f56874
[DOCS] Fix incorrect link pointing to the WP Calypso repo (#44865)
* Fix incorrect link in docs

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-22 10:40:57 -03:00
Vedanshu Jain fcdbc76414
Revert 44084 and 44790 to be punted to next release (#44876)
* Revert "Restore nonce and store notices after hydrating data from controllers. (#44790)"

This reverts commit 2535dd766e.

* Revert "Build path info directly instead of loading REST API. (#44080)"

This reverts commit 4daa3f31f1.

* Add changelog.
2024-02-22 15:43:50 +05:30
Alba Rincón 145905f254
[CYS] Update sidebar links copy (#44762)
* Update assembler sidebar link when no AI available

* Update the sidebar section title depending on the flow

* Revert unnecessary changes

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

* Add missing text domain

* Fix test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-22 09:48:49 +01:00
Alba Rincón b142db05b1
Update footer large Twitter icons to X (#44807)
* Update footer large twitter icons to X

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-22 09:34:22 +01:00
Alba Rincón 856fae433b
[CYS] Fetch the `activeThemeHasMods` right before is used to improve intro loading time (#44647)
* Fetch the activeThemeHasMods right before is used

* Add changelog
2024-02-22 09:30:11 +01:00
Néstor Soriano eb9723e5e0
Remove property type hints in TransientFilesEngine and ReceiptRenderingEngine (#44829) 2024-02-22 08:59:43 +01:00
Néstor Soriano 67787b8a48
Fix the REST API controllers registration (#44833)
The code was mistakenly assuming that any controller class name not
starting with WC_REST_ was handled by the container, but other
plugins may register their own controller classes that use
a different naming convention.
2024-02-22 08:59:27 +01:00
Caleb Mazalevskis 097811fb93
Fix typos. (#40899)
* Fix typos.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-22 07:10:00 +00:00
And Finally 3bafb1b612
Promotions: changed transient name (#44857)
* Changed transient name.

* Changelog.
2024-02-21 17:27:34 +00:00
Adrian Moldovan 4b2f949231
Fix pnpm postinstall temp workaround (#44853) 2024-02-21 10:32:24 -06:00
Remi Corson 20b3d51845
Fetch & display marketplace promotions (#44840)
* Fetch & display marketplace promotions

* add changelog entry

* Pass promos via inline JS, demove unused JS file, rely on transient only

* Return early if not on expected page

* Compare dates in UTC

* remove unused global userLocale

* Small tweaks.

* TypeScript linter errors.

* fix TS lint

---------

Co-authored-by: Remi Corson <1649788+corsonr@users.noreply.github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2024-02-21 16:09:23 +00:00
Tomek Wytrębowicz 0d3008bede
Improve rendering of Order Attribution inputs (#44333)
- Expose public method to render OA input fields 
- Render OA inputs on `woocommerce_checkout_after_customer_details` 
   in case the checkout form does not contain `woocommerce_checkout_shipping`, `woocommerce_after_order_notes`.

Addresses part of #44159

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-02-21 16:38:04 +01:00
Ilyas Foo c601a0b197
Wrangle MarketingRecommendations as RemoteSpecsEngine (#44828)
* Fix potential recursion error, add MarketingRecommendations to extend RemoteSpecsEngine, add error handling, add tests

* Changelog

* Added spec evaluation and return default when empty

* Update plugins/woocommerce/src/Admin/Features/MarketingRecommendations/Init.php

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

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-02-21 15:22:47 +00:00
Adrian Moldovan 34a71f3963
Force mariadb docker image tag (#44841) 2024-02-21 16:06:44 +02:00
Bart Kalisz 045df6f3e7
[E2E] Stabilize Product Collection "on sale" tests (#44796) 2024-02-21 13:44:07 +01:00
Albert Juhé Lluveras 6b9e732ebf
Prevent script caching by using the WC core version to hash Interactivity API assets instead of old WC Blocks version (#44806)
* Prevent script caching by using the WC core version to hash Interactivity API assets instead of old WC Blocks version

* Add changelog entry
2024-02-21 12:14:45 +01:00
Sam Seay ccb1fb3d76
[Experimental] Fix a bug in new attribute filter where we didn't set the attribute from content panel (#44757) 2024-02-21 19:53:15 +13:00
Sam Seay cd5b4196d9
Don't throw exception if data exists for `needsRefreshForInteractivityAPI` (#44808) 2024-02-21 18:53:20 +13:00
Paul Sealock e0d8872376
Remote Spec Splits - Create new value 1 - 120 (#44786) 2024-02-21 15:24:44 +13:00
Ilyas Foo 42aa02740c
Add base RemoteSpecsEngine class, add logging for errors in all remote specs (#44775)
* Add basic RemoteSpecEngine class, add logging for errors

* Changelog

* Fix logic error

* Add log name
2024-02-21 09:33:38 +08:00
Adrian Moldovan f4f4d798fe
[e2e tests] Add tests for product inventory in product block editor (#44699)
* 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
2024-02-20 14:25:16 -08:00
Paul Sealock 487f230f0a
Shipping Settings: Update Create btn text on method creation (#44788)
* Update shipping method btn text on create

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 21:46:28 +00:00
Barry Hughes 171043f079
APIv1 > Orders Controller > Avoid deprecated means of accessing coupon data (#44741)
Update the (REST API v1) orders controller to use the currently supported means of accessing coupon information.

This avoids the generation of deprecation notices, which are problematic for some users who cannot yet update to API v2 or higher.

Fixes #39006
2024-02-20 13:08:04 -08:00
And Finally a1a671d872
Fetch promotions from Woo.com and show bubble on Extensions menu item, if required (#44655)
* Added `WC_Admin_Marketplace_Promotions`, with logic to get promotions from https://woocommerce.com/wp-json/wccom-extensions/3.0/promotions and display them

- Calling `init_marketplace_promotions` on `woocommerce_init`. If we're on the WooCommerce Home or Extensions pages, this calls `fetch_marketplace_promotions` to get promotion data from the transient or else the API.
- If we're on any admin page, calls `show_bubble_promotions` to render menu item bubbles, if there are any.
- Changed method `WC_Admin_Addons::fetch_with_locale` to `WC_Admin_Addons::fetch` and added `$options` parameter, so we can fetch without passing locale. We want to keep requests for promotions as uniform as possible for better caching.

* Fetching promotions on all pages in the WooCommerce admin menu.

* Changed WC_Admin_Marketplace_Promotions to fetch promotions in a scheduled action.

* Added extra condition to check if `$auth['access_token']` is set.
2024-02-20 17:51:26 +00:00
Bart Kalisz b8d2136aa2
[E2E] Setup block theme without opening browser (#44702) 2024-02-20 16:52:53 +01:00
nigeljamesstevenson 58d1f92e5f
Update stable tag to 8.6.1 (#44801)
woorelease: Update stable tag to 8.6.1
2024-02-20 15:47:50 +00:00
louwie17 79375d594c
Add/44643 variation empty state experiment (#44731)
* Update experiment name

* Add changelog
2024-02-20 12:41:43 -03:00
Vedanshu Jain 2535dd766e
Restore nonce and store notices after hydrating data from controllers. (#44790) 2024-02-20 16:39:36 +01:00
Bart Kalisz 82d1df5b37
[E2E] Stabilize a flaky Price Filter test (#44690) 2024-02-20 16:30:16 +01:00
Remi Corson 1cbc04449c
Introduce `<Notice>` component for WooCommerce Admin (#44620)
* Introduce Notice component

* minor alignment fix

* Fix MD title increment

* Fix readme lint

* add changelog entry

* fix CSS lints

* Small tweaks.

Regularising the spelling of isDismissible.
Using sanitizeHTML to sanitize the notice description.
Making the variant classes like &-success to make them a bit shorter.
Adjusting wording of README to convey that this component is designed for the marketplace, though it can be used elsewhere.
Tweaking whitespace in one place in the TSX to please the linter.

* Update plugins/woocommerce-admin/client/marketplace/components/notice/notice.tsx

Co-authored-by: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>

* address feedback

* Changed notice classnames to use `__{$variant}` pattern as well. Restored 40px bottom margin to notices on viewports 600px and above. Added height 24px on icons to ensure they're nicely vertically centred.

---------

Co-authored-by: Remi Corson <1649788+corsonr@users.noreply.github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
Co-authored-by: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>
2024-02-20 14:52:41 +00:00
Alexandre Lara 319c2637eb
Reviews block: Convert editor-block.js to editor-block.tsx and replace propTypes with TypeScript definitions (#44594)
* Convert Reviews Editor code to TypeScript

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 10:58:52 -03:00
Gan Eng Chin de66873c33
Add `source` event props for `marketing_recommended_extension` track events to differentiate recommendations from woo.com API or default fallback data (#44714)
* Add getRecommendationSource util.

* Add `source` eventprop for `marketing_recommended_extension` track event.

* Make test pass with updated track event.

* Add tests for getRecommendationSource.

* Add JSDoc for getRecommendationSource.

* Better test descriptions.

* Add changelog.
2024-02-20 19:44:28 +08:00
Luigi Teschio 5fe5aef5a0
Product Image block: show the setting to control the imageSizing attribute and add the attribute to the `Product Catalog` and `Product Search Results` templates (#44691)
* add imageSizing attribute to the product catalog template

* add attribute for the product search results template

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 10:50:42 +01:00
Luigi Teschio 879cfaec46
[CYS- Core] Improve default palette (#44722)
* improve default palette

* improve comment

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

* improve comment

* fix theme.json

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 10:48:27 +01:00
Luigi Teschio 62f2782715
[CYS - Core] improve logic to find active fonts (#44724)
* improve logic to find active fonts

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

* Update changelog

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
2024-02-20 10:48:09 +01:00
Albert Juhé Lluveras 484398cfe1
Open templates from list instead of loading the URL in block templates e2e tests (#44774)
* Open templates from list instead of loading the URL in block templates e2e tests

* Typo

* Clean up

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

* Make sure correct template is loaded

* Create a TemplateType type to avoid having to define it in several places

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 10:35:27 +01:00
RJ 7f01490fd7
fix: shipping tour should not show usps/dhl to non-us merchants (#44765)
* fix: shipping tour should not show usps/dhl to non-us merchants

* lint
2024-02-20 13:33:01 +08:00
Chi-Hsuan Huang 2f6818772e
Fix untranslated "Are you already selling somewhere else?" text in the product task list (#44763)
* Fix untranslated "Are you already selling somewhere else?" text in the product task list footer.

* Add changelog
2024-02-20 10:25:17 +08:00
Jorge A. Torres 0af71d5c48
Update contributors list with some missing core contributors (#44740)
* Add Proton to contributors list

* Add changelog
2024-02-19 15:57:34 -08:00
Alfredo Sumaran 0407569382
Apply Rector suggestions for PHP 8.1 (#41253)
* Apply Rector suggestions

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

* Apply feedback suggestions

* Add missing if

* Align assignments to satisfy the linter

* Move count call outside the loop to satisfy the linter

* Escape output to satisfy the linter

* Remove unnecessary assignment

* Remove unnecessary is_countable check

* Remove unnecessary array casting

* Restore variable name

* Update changelog entry

* change static to self for consistency
2024-02-19 12:29:16 -08:00
Karol Manijak 5b420159cb
Product Collection: disable "Sync with current query" option for 2nd+ block on archive (#44577)
* Refactor store usage

* Prepare function resolving inherit property for additional check

* Add logic to disable sync with query if there's already one Product Collection on archive that does that

* Add changelog

* Cover the post editor case

* Add E2E test for that and small refactor in tests

* Remove duplicated import

* Fix lint problems

* Fix typo in test description

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>

* Replace confusin abbreviation with other description

* Update the logic to be more robust and covering also the case where Product Collection blocks are nested

* Add issue reference to the comment

* Add eslint disable before ts-ignore

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-02-19 17:51:42 +01:00
Jonathan Lane 852e8f4c0e
Merchant coupon creation (#44671)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-02-19 16:43:53 +02:00
nigeljamesstevenson 7699c52b9d
Update stable tag to 8.6.0 (#44662)
woorelease: Update stable tag to 8.6.0
2024-02-19 13:33:35 +00:00
Néstor Soriano 89c6fbbb7c
Add the Receipts Rendering Engine (#43502) 2024-02-19 12:03:46 +01:00
Chi-Hsuan Huang 0b55f4ee12
Add php unit watcher and update unit test docs (#44681)
* Add phpunit-watcher to automatically rerun PHPUnit tests when source code changes

* Update unit tests docs

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-19 16:40:29 +08:00
Karol Manijak 76f6b0097e
Product Collection: Improve flaky E2E test (#44687)
* Remove unnecessary waitForResponse making a test flaky

* Add changelog
2024-02-19 09:08:11 +01:00
Manish Menaria ce00f299ea
Improve Accessibility in Product Collection Navigation (#44599)
* Add animation for client-side pagination

This includes:
- Addition of animation state management in the frontend file to control the visual transition between pagination states.
- Introduction of new SCSS rules for the start and finish animations, ensuring a seamless and visually appealing pagination experience.
- Modification of the PHP logic to inject necessary HTML for the animation to be applied.

These updates aim to provide a more engaging and responsive interface for users navigating through product collection.

* Enhance accessibility for product collection navigation

This commit introduces several improvements to enhance accessibility and user experience. Specifically, it adds new context properties to manage accessibility messages during the navigation process, including messages for loading and when a page has loaded. These changes ensure that screen reader users receive appropriate feedback during navigation.

Changes made:
- Added `accessibilityMessage`, `accessibilityLoadingMessage`, and `accessibilityLoadedMessage` properties to the `ProductCollectionStoreContext`. These properties store messages to be announced by screen readers during different stages of page navigation.
- Implemented logic in the product collection store to update the `accessibilityMessage` during the start of navigation (showing a loading message) and upon completion (showing a loaded message).
- Utilized a technique to ensure that consecutive identical messages are still announced by screen readers, by appending a no-break space to the message if it is the same as the previous one. This follows a pattern similar to the `@wordpress/a11y` package.
- In `ProductCollection.php`, enhanced the block's HTML output to include these new accessibility messages and integrated them with the existing interactive data attributes. This ensures that the front-end components are fully prepared to handle these accessibility enhancements.
- Added a new `div` with `class="screen-reader-text"` and `aria-live="polite"` attributes, which dynamically displays the accessibility message based on the navigation state. This div complements the visual pagination animation with an accessibility-focused mechanism for announcing the page load states to screen reader users.

By addressing accessibility considerations with these enhancements, we're making Product Collection navigation more inclusive and user-friendly for all users.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-19 11:35:14 +05:30
Shiva Poudel a14c59b819
Fix - TGM Plugin activation calling undefined function wc_get_screen_ids (#44114)
Fixes an edge case where `WC_Admin_Notices::add_notices()` can be called, but the `wc_get_screen_ids()` function has not yet been defined.
2024-02-16 16:10:34 -08:00
Tarun Vijwani 4e6476a996
Adjust spacing in/between elements on the Cart and Checkout block pages (#44160)
* Add spacing in Checkout block page

* Add spacing in Order summary block

* Update responsive styles for order summary panel

* Update styles for cart and cart line items table

* Update styles for order summary and cross-sells products

* Remove unnecessary CSS styles from cart line items table and cart block

* Remove unused CSS class from cart line items table

* Fix linting errors

* Add changelog

* Fix changelog lint

* Update quantity selector style

* Increase the line-height of the set description and remove margin top from email field

* Add margin-top to order summary image and express payment margin adjustment

* Update styles for cart and checkout components

* Fix linting error

* Fix margin units in cart-cross-sells-products

* Replace em with px

* Add margin-top to payment method container

* Update styles for Cart block for mobile screen

* Update padding in cart style.scss
2024-02-17 01:50:11 +04:00
github-actions[bot] 91fcab7008
Delete changelog files based on PR 44704 (#44730)
Delete changelog files for 44704

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 20:59:11 +00:00
github-actions[bot] 86f77c89ef
Delete changelog files based on PR 44698 (#44728)
Delete changelog files for 44698

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 20:48:50 +00:00
github-actions[bot] e736b62e95
Delete changelog files based on PR 44680 (#44720)
Delete changelog files for 44680

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 20:42:57 +00:00
Jonathan Lane 19b51c83e7
Tests for restricted coupon creation (#44716)
* Tests for restricted coupon creation

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-16 15:43:42 -04:00
Tarun Vijwani 7528a7d65e
Fix removal of express payment method from state (#44633)
* Fix removal of express payment method from state

- Correct the logic for removing an express payment method from the availableExpressPaymentMethods state object.
- Previously, the deletion targeted the incorrect object, leading to incorrect change in state. Now, the correct entry is removed using destructuring and rest parameters, ensuring the express payment method is properly deleted.

* Revert "Fix removal of express payment method from state"

This reverts commit 8e24553794.

* Fix typo error in the reducer

* Add unit to make sure correct express payment method is removed

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

* Remove payment method descriptions from express and fix changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-16 23:00:42 +04:00
github-actions[bot] ea50305d91
Delete changelog files based on PR 44676 (#44718)
Delete changelog files for 44676

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 18:29:45 +00:00
Seghir Nadir e8a403b406
add default values for admin address filters (#44704)
* add default values for "woocommerce_admin_shipping_fields" and "woocommerce_admin_billing_fields" filters

* use null instead
2024-02-16 15:10:26 +00:00
Tom Cafferkey 5a761ae05e
Move condition to check post status before rendering product (#44698)
Co-authored-by: Leif Singer <git@singer.sh>
2024-02-16 14:15:48 +00:00
Alba Rincón 2d2d626c03
[CYS on Core] Update homepage templates intro patterns (#44616)
* Add bottom margin to the pattern

* Increase the height of the pattern to match designs

* Replace intro patterns on Core

* Add changelog

* Update the default intro to be hero product split
2024-02-16 14:59:16 +01:00
Bart Kalisz 711f420ef1
[E2E] Stabilize flaky Add to Cart test (#44639)
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-02-16 13:44:41 +00:00
Thomas Roberts 0d5c224520
Prevent script caching by using the WC core version to hash WC blocks assets instead of old WC Blocks version (#44676)
* use the WC core version to hash WC blocks assets

This is because the previous hash was generated using WC blocks version, which hasn't been updated since joining the monorepo.

* Make class variable to hold new prefixed wc version

* Add changelog

* Add var type to new class property

* Add prefix to prevent collission

* also use wc version for styles

* make variable public

---------

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2024-02-16 14:07:05 +01:00
Tarun Vijwani 506499dec4
Prevent prefilling of the billing address with the shipping address in the Checkout block for the Guest Shopper (#44347)
* Clear billing address when useShippingAsBilling checkbox is unchecked

* Add billing address sync with server

* Add useRef hook to store previous billing address and update sync functions

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

* Revert "Add useRef hook to store previous billing address and update sync functions"

This reverts commit 7bc3312ab7.

* Added condition to clear address only for guest users

* Add E2E test to check billing address form is empty for Guest shopper

* Fix typo

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

* Updated docs-manifest.json

* Revert "Updated docs-manifest.json"

This reverts commit 20d578a9d6.

* Include company field in the E2E test

* Replace beforeAll with beforeEach

* Skip country reset to keep consistency with Shortcode Checkout

* Remove sync billing address on server

* Update E2E test to include the shipping address check

* Remove unsed  imports

* Clear address fields except country and state

* Optimize the billing and shipping address check with switch statement

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-02-16 16:10:51 +04:00
Sam Seay 5ecea1b8c2
Support testing many variants of a block at runtime via dynamically generated templates (#44223) 2024-02-17 01:00:36 +13:00
Manish Menaria e210302e8a
Product Collection: Add loading indicator for client-side pagination (#44571)
* Add animation for client-side pagination

This includes:
- Addition of animation state management in the frontend file to control the visual transition between pagination states.
- Introduction of new SCSS rules for the start and finish animations, ensuring a seamless and visually appealing pagination experience.
- Modification of the PHP logic to inject necessary HTML for the animation to be applied.

These updates aim to provide a more engaging and responsive interface for users navigating through product collection.

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

* Allow user clicks under product collection's loading animation

This commit enhances the user experience of the loading animation for the product collection block. Changes include:

- Specifying `transform-origin: 0% 0%;` directly within the block's initial style to indicate the animation should start from the left
- Adding `pointer-events: none;` to allow user interactions with elements underneath the loading animation, thus improving usability by not blocking clicks.

Additionally, redundant `transform-origin` properties were removed from the `@keyframes` declaration to clean up the code and avoid unnecessary repetition. This simplification contributes to both the maintainability and readability of the stylesheet.

* Fix linting errors in SCSS file

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-16 15:43:58 +05:30
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
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
Mike Jolley b94c14e745
[Experiment] Fix additional address field validation notices (#44615) 2024-02-14 10:02:30 -08: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
Albert Juhé Lluveras 13ded5be76
Minor typo and text styling fixes (#44583)
* Fix typos in PHP comments

* Fix styling of tests/README.md

* Other linting fixes

* Add changelog file
2024-02-14 11:13:28 +01:00
Luigi Teschio cb1ae99a77
Core - CYS: fix fonts not loaded on the font picker iframes (#44586)
* Core - CYS: fix fonts not loaded on the font picker iframes

* add changelog

* fix lint error
2024-02-14 10:30:18 +01:00
Alba Rincón 0f198da833
[CYS] Update "Start customizing your store" task description on Core (#44584)
* Update customized store task description on Core

* Add changelog
2024-02-14 09:08:16 +01:00
Alba Rincón da8fee41aa
[CYS] Update the "Change your homepage" description on Core (#44579)
* Update the "Change your homepage" description on Core

* Add changelog
2024-02-14 09:07:55 +01:00
Corey McKrill b2d9d6f118
Logging: Add filter to modify the list of expired logs to be deleted (#44380)
* Logging: Add filter to modify the list of expired logs to be deleted

This provides a way for extensions to ensure that some log files are
retained for a different time period than the normal
retention period setting.

* phpcs cleanup

* Add changelog file

* Add note to settings view when hook has filter on it

Also remove the note about retention days from the log entry that's
generated when expired log files are deleted
2024-02-13 12:42:38 -08:00
Matt Sherman a619aba5ee
Product Editor: load translations (#44520)
* Clarify when the custom message is used in useConfirmUnsavedChanges

* Changelog

* Load translations for wc-navigation and wc-product-editor scripts

* Changelog
2024-02-13 15:38:04 -05:00
Mike Jolley 51a9da9f2c
[Experiment] Additional field extensible sanitisation and validation handling (#44463)
* Fix field saving in account area

* Check for error notices in core form handler

* Tidy up additional field saving in api

* sanitize_additional_fields does not expect request

* Validate fields with extra context

* Revert "Tidy up additional field saving in api"

This reverts commit 872c8f4afb.

* Tidy update_customer_from_request

* validate_field docs

* Validation and sanitization hooks

* Address schema validates fields and address location

* Validate locations

* Frontend validation

* Remove empty error response

* Document account details hook

* field_key

* Improve validation routine

* Changelog

* Swap key and value in woocommerce_blocks_validate_additional_field hook

* woocommerce_blocks_validate_location_X_fields

* Validation and sanitization callbacks

* Update try catch blocks
2024-02-13 19:40:55 +01:00
Mike Jolley cea1c10122
Fix coupon codes containing apostrophes (#40998)
* Use wp_kses_post to sanitize coupon codes

* Fix notice (php 8)

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

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

* Remove duplicate changelog entry

* Try alternative wp_kses function

* Account for unfiltered_html

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2024-02-13 17:01:49 +00:00
Alba Rincón a48e2111b8
[CYS] Add title to the "Product Gallery" pattern (#44556)
* Add title to the "Product Gallery" pattern

* Add changelog
2024-02-13 14:40:49 +01:00
Luigi Teschio 69728b70e9
CYS - Core: catch error when font installation fails (#44559)
* CYS - Core: catch error when font installation fails

* add changelog

* reduce the requests number
2024-02-13 13:15:52 +00:00
Luigi Teschio a2d35b0563
CYS - Core: install fonts only when the tracking is enabled (#44558)
* CYS - Core: install fonts only when the tracking is enabled

* add a parameter to reduce the response payload

* add changelog
2024-02-13 14:03:06 +01:00
Chris Lilitsas 8d5c0dae83
Ensure proper handling of product-related taxonomies in filtering logic (#44230)
* Fix product-related whitelisting in Product Query and Collection blocks

* Fix Product Query Utility

* Remove store-api related fix

* Changelog
2024-02-13 13:59:02 +02:00
Adrian Moldovan e863c02551
[e2e tests] Add tests for managing product images in block editor (#44470) 2024-02-13 01:20:48 +02:00
Karol Manijak 2750e79224
Getting the Product Collection location/context (#43997)
* Early implementation of getting the Product Collection location/context

* Solve the problem of async fetch in the hook

* Improve typing

* Import core data store instead of hardcoding store name

* Recognise Product Category and Product Tag

* Remove attr property from archive location data

* Unify states naming

* Add TODO entry

* Display the info about the location of Product Collection

* Improve the typing

* Recognise if Product Collection is nested in Single Product block

* Improve cases descriptions and add some defaults to potentially undefined values

* Change the taxonomies sourceData

* Recognise Mini Cart as Cart context

* Recognise attribute as archive contect but no taxonomy

* Refactor the function into single useEffect and clean it up

* Fix typo

* Remove unnecessary import

* Stop rendering the output in Editor (it was for demo purposes)

* Pass location data to Product Template query in Editor

* Replace templateSlugs literal strings with object reference

* Rename parseResponse function to more specific name getIdFromResponse

* Add dpeendency array to useEffect

* Refactor templates detection

* Use full taxonomy names instead of shortcuts

* Write down scenarios to test

* Working scenario

* Change the verification way for more robust

* Add more robust methods to include Single Product block

* Add test Product Collection in Single Product block in a Single Product Template

* Imprvoe the order of veryfing the requests

* Fix linter issues. Although that makes code less readable

* Improve the useGetLocation typing so it's more generic

* Rework the E2E tests regarding location of Product Collection and limit their number

* Bring back necessary eslint-disable

* Remove unused imports

* Uncomment line required for other tests

* Add changelog

* Rename constant from BLOCK_NAME to BLOCK_SLUG as it's a slug

* Add a BLOCK_NAME constant and replace the literal block name usages in E2E tests

* Fix post merge issues

* Fix test after merge

* Adjust the tests to kick off waiting for request before action that triggers them
2024-02-12 20:59:40 +01:00
Karol Manijak cc0d7368e9
Add missing Beta label to Product Filters E2E tests (#44564)
* Add missing Beta label to Product Filters E2E tests

* Add changelog
2024-02-12 20:26:19 +01:00
Néstor Soriano 60cc3df264
Fix for the dependency injection container resolution by tag (#44496)
* Fix for the DI container resolution by tag.

This fixes an issue that arises when using service providers inheriting
from AbstractInterfaceServiceProvider: if one of these providers
registers classes both by name and by tag, and one of its registered
classes is requested with 'get' by name before a list of classes is
requested by tag, then that service provider gets locked as the only one
providing that tag, and the others get ignored. This is due to the fact
that container definitions are created "on the fly" as needed and the
base 'get' method won't try to register additional providers if the
requested tag is already provided by at least one of the already
existing definitions.

* Add changelog file

* Add a unit test for the fix
2024-02-12 10:21:51 -08:00
Luigi Teschio 79ff29138c
CYS - Core: fix fonts not loaded after the setup (#44550)
* CYS - Core: fix fonts not loaded after the setup

* add changelog
2024-02-12 18:33:19 +01:00
Luigi Teschio 3919b8361d
CYS - Core: Add async font installation (#44473)
* CYS - Core: Ensure that the bodoni font is loaded

* CYS-Core: install fonts via async job

* ensure that the font are installed only when the Font Library is installed

* improve documentation and validation

* add changelog

* remove unused class

* remove not necessary changes

* improve documentation

* improving naming

* improve documentation

* fix PHP linter

* fix phpdoc comment
2024-02-12 16:23:21 +00:00
Luigi Teschio 738a57fe98
Core - CYS: fix inter font not applied (#44544)
* Core - CYS: fix inter font not applied

* remove logs

* add changelog
2024-02-12 14:09:04 +00:00
Sam Seay 143388dae8
[Experimental] Add (Beta) suffix to block name of new filter blocks (#44487) 2024-02-12 11:15:49 +00:00
Manish Menaria 4ae60196ea
Product Collection: Make attributes available in rest_product_query hook (#44150)
* Make attributes available in rest_product_query hook

This commit introduces the 'includeInQueryContext' attribute to the 'woocommerce/product-collection' block and updates the 'woocommerce/product-template' block to consume this new attribute.

Key Changes:
1. `woocommerce/product-collection` Block:
   - A new attribute 'includeInQueryContext' is added in `block.json`. This attribute is designed to hold a list of attribute names relevant for the query context.
   - The 'includeInQueryContext' attribute is included in the `providesContext` field to ensure its availability to child blocks.
   - In `constants.ts`, default values for 'includeInQueryContext' are defined, specifying 'collection' and 'id' as initial attributes.
   - The `types.ts` file is updated with a comment explaining the purpose of 'includeInQueryContext'.

2. `woocommerce/product-template` Block:
   - Modified `block.json` to utilize the 'includeInQueryContext' context provided by the parent `woocommerce/product-collection` block.
   - The `edit.tsx` file is updated to handle the new context. It uses a newly added utility function `useProductCollectionBlockAttributes` from `utils.tsx` to access parent block attributes.
   - The `utils.tsx` file is introduced, containing the `useProductCollectionBlockAttributes` hook. This hook is responsible for finding the parent 'woocommerce/product-collection' block and returning its attributes.
   - Within `edit.tsx`, logic is added to create a query context object based on the attributes specified in 'includeInQueryContext', enhancing the block's ability to dynamically adapt to changes.

* Remove commented code

* Rename query context attribute and optimize parent block detection

This commit introduces two significant changes aimed at improving code readability and efficiency.

1. **Renaming of Query Context Attribute:**
   - The attribute `includeInQueryContext` has been renamed to `queryContextIncludes` across various files, including block JSON configurations and TypeScript definitions. This change makes the attribute's purpose more intuitive, indicating it specifies which attributes to include in the query context.

2. **Optimized Parent Block Detection:**
   - Replaced the use of `getBlockParents` with `getBlockParentsByBlockName` in utility functions to find the closest Product Collection block. This optimization allows for a more direct and efficient way to identify the relevant parent block by specifying the block name, reducing unnecessary iterations and improving code performance.

* Streamline query context construction in product template

Key Changes:
- **Introduction of `useProductCollectionQueryContext` Hook:** This new hook takes the `clientId` and `queryContextIncludes` as inputs and returns a query context object. It encapsulates the logic for fetching parent product collection block attributes and constructing the query context accordingly. This abstraction simplifies the edit component's logic, focusing on the essentials and improving code readability.
- **Optimization of Parent Block Detection:** The hook uses `getBlockParentsByBlockName` to accurately and efficiently find the closest parent `Product Collection` block, minimizing the overhead previously associated with traversing the block hierarchy.

* Always include `collection` and `id` in query context

* Minor refactor

* Enhance query context handling for more maintainable code

- Introduced `DEFAULT_QUERY_CONTEXT_ATTRIBUTES` in `edit.tsx` to maintain a clear list of default query context attributes.
- Modified `ProductTemplateEdit` to automatically include these default attributes in `queryContextIncludes`, ensuring they are always part of the query context without manual initialization.
- Simplified `useProductCollectionQueryContext` in `utils.tsx` by removing static initialization of 'collection' and 'id', relying instead on the dynamic addition of necessary attributes from `queryContextIncludes`.

This refactor enhances the maintainability and clarity of the code, ensuring a solid foundation for future enhancements and features.

* Add E2E tests for Product Collection query context

- Added a new test suite 'Query Context in Editor' to validate the correctness of query context parameters when the Product Collection block is used. This suite ensures that:
  - For the 'Product Catalog', only the ID is sent in the query context, confirming that collection-specific parameters are excluded when not relevant.
  - For collections such as 'On Sale', the collection name is correctly passed in the query context, validating that the block dynamically adjusts query parameters based on its settings.

- Introduced a new utility method `setupAndFetchQueryContextURL` in `product-collection.page.ts`. This method automates the setup of a post with the Product Collection block and fetches the URL with query context parameters, facilitating the validation of query context handling.

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

* Fix edge case when `queryContextIncludes` is not defined

- Initializing `queryContextIncludes` with a default empty array directly in the destructuring assignment of the component's props. This approach ensures that `queryContextIncludes` is always an array, simplifying downstream logic.
- Creating a new constant `queryContextIncludesWithDefaults` to hold the combination of `queryContextIncludes` and `DEFAULT_QUERY_CONTEXT_ATTRIBUTES`. This step avoids directly mutating the `queryContextIncludes` prop, aligning with best practices for functional purity and making the code easier to understand and debug.
- Updating the `useProductCollectionQueryContext` hook call to use `queryContextIncludesWithDefaults`. This ensures that the default query context attributes are consistently included without altering the original prop.

These adjustments not only enhance the code's maintainability but also ensure more predictable behavior by avoiding side effects related to parameter mutation.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-12 14:15:24 +05:30
Karol Manijak 96f3e3c98b
Remove global pageObject action from Product Collection tests and add it as before each for specific tests (#44407)
* Remove global pageObject action from Product Collection tests and add it as before all for specific tests

* Replace beforeAll with beforeEach

* Adjust the beforeEach usage

* Add changelog

* Refresh locators when adding Single Product block as it's not initialised in pageObject

* Change method dedicated to templates to one dedicated to posts
2024-02-12 09:44:02 +01:00
Alba Rincón 7f8b1e201c
[CYS] Ensure the font family for buttons match the one assigned for the content, not the title (#44458)
* Fix select font for buttons

* Add changelog
2024-02-12 09:25:36 +01:00
github-actions[bot] cd43dd1116
Delete changelog files based on PR 44494 (#44534)
Delete changelog files for 44494

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-12 10:11:14 +08:00
kevinbates abc6993678
Update woocommerce.php (#44527)
* Update woocommerce.php

* Add changelog file
2024-02-09 17:27:18 -08:00
kevinbates 578f711730
Update readme.txt (#44526)
* Update readme.txt

Removing Woo Express section
Correcting eCommerce -> ecommerce

* Add changelog file
2024-02-09 17:26:57 -08:00
Fernando Marichal 30f66aa94f
[Product editor block]: Rename the Add button to Publish (#44461)
* Rename Publish button

* Fix e2e tests

* Add changelog

* Add WC changelog

* Modify "Product published" copy
2024-02-09 15:19:35 -03:00
Albert Juhé Lluveras 2f5eaa1f4c
BlockTemplateUtils cleanup (#44256)
* Remove 'get_block_template' backwards compatibility check

* Add back get_block_template as a deprecated function

* Deprecate BlockTemplateUtils::filter_block_templates_by_feature_flag()

* Replace 'default template' with 'fallback template'

* Only load BlockTemplatesController in block themes

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

* Remove unnecessary WP version comparison

* Revert "Only load BlockTemplatesController in block themes"

This reverts commit 8e1ed347d61b7ae5e8b8b96fa73b410565570f01.

* Remove deprecated functions, as they are marked as internal

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-09 18:50:08 +01:00
nigeljamesstevenson c8f8299f02
Remove WooCommerce Blocks entry from the WooCommerce status page (#44412)
* Remove WooCommerce Blocks entry from the WooCommerce status page

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-09 17:44:14 +00:00
Alexandre Lara 7ec1b7f3a1
Product Gallery block: Add logic to trap keyboard focus within the Product Gallery Pop-Up (#44439)
* Add logic to trap keyboard focus inside the Product Gallery Pop-Up

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

* Remove unnecessary condition

* Fix issue with keyboard focus trap not working within the Pop-Up

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-09 13:43:51 -03:00
Bartosz Budzanowski 8eea9f77ff
Update marketplace suggestion wording. (#44494)
* Update description wording for Marketplace Suggestions, Show Suggestions setting.

* Add changelog file.

* Update tests.
2024-02-09 15:37:39 +00:00
Hicham Boushaba a903aa8633
Revert the override of the Jetpack data endpoint (#44390)
Revert PR #38987
2024-02-09 07:22:51 -08:00
Álvaro Thomas accbf30da5
[e2e] Can Edit and Delete Product Review (#44411)
* Update product-review

Add test to edit a product review and another test to delete it

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

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

* Added test data in fixture and changelog extra line

Change test data use from constants at the top to test data created in a fixture for each test. Also, added extra line to the changelog file.

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

* Update changelog

Fixed mixed lines on previous commit.

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

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/product-reviews.spec.js

Remove edited timestamp

Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/product-reviews.spec.js

Update hover action to review id.

Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/product-reviews.spec.js

Change Quick Edit button to reach review identifier

Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/product-reviews.spec.js

Replace updated review check to single line assert

Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/product-reviews.spec.js

Hover to edit on review identifier

Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/product-reviews.spec.js

Point to trash a review to its identifier.

Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/product-reviews.spec.js

Point to trash a review to its identifier.

Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>

* Added Review Edit test

Added Review Edit test apart from Quick Edit test. Included assertions to verify that the review has been edited and can be seen both in the reviews list and the shop's page.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-02-09 16:12:16 +01:00
Alexandre Lara 74c6fcad2d
Product Gallery block > Pop-Up: Fix overlay sizing issue (#44479)
* Fix overlay issue when Product Gallery Pop-Up is open

* Fix stylelint error

* Add changelog

* Fix e2e tests for Product Gallery Pop-Up
2024-02-09 11:38:41 -03:00
Luigi Teschio b91762be69
CYS - Core: Ensure that the Bodoni font is loaded (#44464)
* CYS - Core: Ensure that the bodoni font is loaded

* add changelog
2024-02-09 15:13:38 +01:00
Corey McKrill 1af675e502
Logging: Add check for file key when parsing backtrace (#44486)
Ensures that no undefined index warnings are thrown while parsing
the backtrace to determine a log's source.

Fixes #44475
2024-02-09 18:06:50 +05:30
Albert Juhé Lluveras 1905534fb8
Improve password-protected Single Product block template to verify correct template is displayed after correct password is introduced (#44452)
* Improve password-protected Single Product block template to verify correct template is displayed after correct password is introduced

* Add changelog entry
2024-02-09 10:53:27 +01:00
Karol Manijak db082421ad
Product Collection: fix assymmetrical padding in Editor (#44403)
* Import editor.scss styles of Product Templayte and increase specificity

* Add changelog

* Add ts ignore

* Revert changing eslint-disable as it conficts with another rule creating more errors
2024-02-09 09:42:29 +01:00
Albert Juhé Lluveras f65a7e45a5
Fix e2e tests due to duplicate rows when clearing customizations (#44454)
* Fix e2e tests due to duplicate rows when clearing customizations

* Add changelog entry
2024-02-08 23:15:11 +01:00
Christopher Allford 8b4efc9c03
Added Missing Blocks Linting Change Trigger (#44233)
* Added Missing LInting Changes

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-08 13:48:03 -08:00
Fernando Marichal a89d2572f0
Product Editor: Subsection block (#43725)
* Add SubsectionInterface

* Replace use of add_section inside sections

* Add Subsection class

* Add subsection block component

* Add subsection-description block

* Update deprecation note

* Add changelogs

* Fix lint

* Add get_subsection_by_id

* Add tests

* Fix ProductFormTemplate lint

* Fix CustomProductFormTemplateTest lint

* fix readme

* Fix lint

* Replace add_section with add_subsection

* Fix readme

* Fix markdown file multiple headings duplication
2024-02-08 15:44:49 -03:00
Vedanshu Jain 4daa3f31f1
Build path info directly instead of loading REST API. (#44080)
* Build path directly instead of directly loading REST API.

* Add changelog.

* Make shapes of routes array consistent with whats returned in API.

* Add doc comment.

* Fix missing slash typo

* Make linter happy.

* Add doc block for filter.

* Short hydration logic to use controller directly.

* Rename _get_path to get_path_regex for accuracy and lint.

* Restore nonce check bypass for internal hydration requests.

* Restore cache notice check to allow controllers to start from clean slate.

* Update since tag.
2024-02-08 16:36:21 +00:00
Luigi Teschio abdf0c3f8a
CYS - Core: ensure that the the default font pair and color pair are selected (#44309)
* CYS - Core: ensure that the default font and color are selected

* remove console.log

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

* add comment

* add changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-08 15:08:38 +00:00
Mike Jolley 509ac4ffd7
Fix deprecation notices for legacy order item keys. (#44362)
* Declare legacy variables to prevent PHP notices

* changelog
2024-02-08 12:51:34 +00:00
Alba Rincón 5af5f9b235
[CYS on Core] Ensure the size of fonts is not affected by the font family changes (#44424)
* Fix fonts affecting the size of each other

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

* Remove log

* Removae old typography settings before applying new ones

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-08 13:38:20 +01:00
Jonathan Lane d15bd09c39
Update daily workflow to sharding (#44330)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-08 11:45:03 +02:00
Albert Juhé Lluveras e0f4ed8509
Add automated tests to verify specific product block templates are rendered (#44363)
* Add automated tests to verify specific product templates are rendered

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-08 10:18:33 +01:00
Chris Lilitsas 60c17eb126
Include the selected collection in the product collection block context (#43247)
* Include collection attribute in the block context

* add 'collection' to useContext for Product Template

* Changelog

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-02-08 10:55:05 +02:00
Adrian Moldovan 035eb2dade
[e2e tests] Add new tests for up-sells and cross-sells (#44154)
* Add tests skeleton

* Add up-sell test

* Add changelog

* Add test for cross-sells

* Renamed spec file

* Add tests for remove up-sells and remove cross-sells

* Update the viewport

* Extract the update product action into a function

* Fix the expect for up-sells

* Add a poll mechanism when checking that up-sells were removed.

* * Use backspace to remove linked items

* Add a check for up-sells before removing them to prevent a false negative result

* Uncomment cleanup code

* Revert viewport height
2024-02-07 14:28:56 -08:00
Alexandre Lara f7b92e8b6b
Product Gallery block: Focus should return to trigger element when closing pop-up (#44414)
* Return focus to trigger element when closing pop-up

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

* Fix php cs error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-07 17:18:41 -03:00
Fernando Marichal 19a78cd176
Add pre-publish sidebar (#44331)
* Add prepublish sidebar

* Add openPrepublishSidebar to store

* Add changelog

* Rename modal and small refactor

* Add feature flag

* Move prepublish sidebar

* change import path

* Rename classes

* Fix width

* Fix styles

* Rename prepublish panel

* Rename div class

* Remove onSuccess from PublishButton

* Fix panel position

* Use actions instead of sidebar

* Add wc-admin changelog

* Move changelog

* Fix lint
2024-02-07 15:30:33 -03:00
Adrian Moldovan 2628a52385
[e2e tests] New tests for product edit in block editor (#44272)
* Add new test with a product name edit

* Add changelog

* Update price and description

* Check product summary update

* Remove unnecessary interpolation
2024-02-07 09:46:19 -04:00
Néstor Soriano f730e4edb7
Simplify the applied coupon data that gets stored as line item meta (#44113)
Previously, a 'coupon_data' line item meta entru was being stored
when a coupon was applied to an order. Now a much shorter
'coupon_reapply_info' entry is stored instead, containing just
coupon id, code, discount type, amount, and whether the coupon
grants free shipping.
2024-02-07 12:23:23 +01:00
Veljko V 28bfa5465f
Improve existing E2E shopper product description & images test (#44365)
* Improve existing simple product test

* Add missing changelog
2024-02-07 11:33:18 +01:00
Karol Manijak 67dda736d4
Improve flaky Product Collection E2E test when nested in Single Product block (#44404)
* Improve Product Collection test when nested in Single Product block, previous version was flakyu

* Add changelog

* Move the priovate method below the comment starting private methods

* Remove unnecessary wait
2024-02-07 07:53:48 +01:00
Alexandre Lara 0654fa1997
Product Gallery block: Announce Pop-Up Opening with Voiceovers (#44332)
* Add aria attributes to product gallery pop-up

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

* Fix Interactivity API store import

* Announce Dialog opening with VoiceOver

* fix php cs lint error

* Remove unnecessary data-wc-watch directive from Product Gallery block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-06 14:28:33 -03:00
Mike Jolley 45923dc5f3
[Experiment] Handle customer session meta data (#44181)
* Update data store to bail if there is no customer ID

* Use WC_Data meta functions

* Save and load meta in session class

* Customer session handling

* CheckoutFields - only persist customer data to accounts

* Inline docs for session handling

* Handle meta data in session

* Document wc->customer inline

* Store only additional fields in session

* Prevent notice in WC_Data

* Organise keys and remove duplicates

* Correctly save fields to account

* Fix notices on checkout

* Remove unnecessary diff

* Changelog

* Go back to previous way to loading session handler to avoid 3rd party breakage

* No need to track is_session

* white space

* Remove changes to customer data store

* Update class-wc-customer-data-store.php

* Populate client from additional values from api

* Additional fields in session

* Add woocommerce_customer_allowed_session_meta_keys hook

* Put back legacy keys for tests

* Remove key fixes

* Don't save additional fields to customer object

* Remove duplicate init call

* Only persist contact fields
2024-02-06 15:16:00 +00:00
Alba Rincón fa9d68eed6
[CYS] Fix - Add back parent machine to the `designWithNoAiStateMachineDefinition` child machine option (#44397)
* Add back parent machine to the designWithoutAi child machine option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-06 14:28:22 +01:00
github-actions[bot] e373a69209
Delete changelog files based on PR 43834 (#44399)
Delete changelog files for 43834

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-06 20:33:57 +08:00
Albert Juhé Lluveras fa9d42be4f
Add template title and description on 'get_block_template' hook (#44254)
* Simplify add template title and description

* Add template title and description on 'get_block_template' hook. Fixes #42221

* Add tests

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

* Fix test in template parts

* Use BlockTemplateUtils::template_has_title when possible

* Add test also when saving the default WooCommerce template

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-06 13:33:38 +01:00
Alexandre Lara b4928ed46a
Product Gallery block: Enable keyboard navigation for thumbnails (#44236)
* Add ability to select thumbnails using keyboard

* Add ability to open the Product Gallery pop up using the keyboard

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

* Fix outline border not showing on Thumbnails on some browsers

* Prevent firefox browser from focusing on UL tag of the Large Image block

* Enable usage of 'Space' and 'NumpadEnter' keys to navigate between the thumbnails

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-06 08:55:03 -03:00
github-actions[bot] a0980a1178
Delete changelog files based on PR 44359 (#44396)
Delete changelog files for 44359

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-06 19:52:11 +08:00
Mike Jolley 35630bb52b
Update combobox validation message to be more generic (#44229)
* Update combobox validation message

* Changelog
2024-02-06 11:51:09 +00:00
Luigi Teschio 159d47434b
[CYS - Core] Before installing the fonts, ensure that the font library is available (#44358)
* Avoid duplicating the `/onboarding/themes/recommended` request

* Use `fetchActiveThemeHasMods` in the `fetchIntroData` function

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

* WIP

* WIP

* WIP

* WIP

* Move the `activeThemeHasMods` to outside the `intro` key, since it's used also in other places

Refactor, add comments and cleanup

* Remove unnecessary log

* Set the `activeThemeHasMods` on the parent window to true after the design step to avoid having to fetch it again

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

* Remove unused import

* Add comment and ref to the new issue

* CYS - Core: fix flow when Font Library is not installed

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

* improve naming

---------

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-02-06 11:28:26 +01:00
Sam Seay 5f00e2f87a
[Experimental] Add e2e tests for the rating filter block (#44192) 2024-02-06 23:22:21 +13:00
Christopher Allford a90b044e73
Updated PNPM Lock File (#44382)
* Updated Lock File

* Add changefile(s) from automation for the following project(s): woo-ai

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-06 09:33:58 +00:00
Alexandre Lara 560f0e933d
Product Gallery block: Prevent block error when a user inputs a decimal number for the Number of Thumbnails setting (#44282)
* fix error on decimal input for the Number of Thumbnails setting

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-05 15:17:35 -03:00
github-actions[bot] b764167f11
Delete changelog files based on PR 44283 (#44368)
Delete changelog files for 44283

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-06 00:44:36 +08:00
Mike Jolley fa01e1b541
[Experimental] Add option to `show_in_order_confirmation` for additional checkout fields (#44314)
* Improve readability of register_checkout_field

* show_in_order_confirmation

* changelog
2024-02-05 16:19:34 +00:00