Commit Graph

20109 Commits

Author SHA1 Message Date
Alexandre Lara 85ec4a8cc1
Product Filter: Attribute (Beta) block - Fix block preview (#45558)
* Pass isPreview prop to inner blocks of the Product Filter block

* Add logic to render preview block when in Preview mode

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 16:27:01 -03:00
Bart Kalisz 1c1dc10958
Blocks E2E: Fix guest user handling in checkout tests (#45624) 2024-03-15 17:23:19 +00:00
Luigi Teschio 25c804ae7c
CYS - Core: fix Product Rating block renders (#45600)
* CYS - Core: fix Product Rating block renders

* add comment

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 17:01:56 +00:00
Luigi Teschio e5d33df9ab
CYS - fix warning Tooltip (#45592)
* CYS - fix warning

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 16:28:47 +00:00
Seghir Nadir 6016aad6c2
Add unit tests to Checkout Additional Fields (#45499)
* try running tests

* add additional fields unit tests

* add keys back to Cart tests

* add extra checks to unit testing

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

* address feedback

* fix linting issues

* add docblock

* escape errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 15:02:43 +00:00
Seghir Nadir 0000d754c1
Add snapshot tracking for Checkout additional fields. (#44310)
* add snapshot tracking

* add changelog

* address feedback

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

* update changelog

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

* remove the extra changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 14:43:05 +00:00
Ahmed ed3aab14cc
Redirect to WooPayments Connect page in the Payments task (#45540)
* Add get_action_url for Payments task

* Check if plugin active before redirecting to connect page

* Add changelog

* Fix linting issues

* Point payments task to welcome page when WCPay incentive active

* Point WooPayments installed task to Connect page

* Rename WooPayments to payments

* Add from query arg

* Adjust payments task URL logic to account for suggestions logic

* Fix for partially onboarded accounts

* Replace Get paid with WooPayments

* Add new test for unsupported countries

* Add missing api definition

* Add missing baseURL

* Maybe change order of tests to fix failing test

* Revert changes to package.json (error in push)

---------

Co-authored-by: Vlad Olaru <vlad@pixelgrade.com>
Co-authored-by: oaratovskyi <oleksandr.aratovskyi@automattic.com>
2024-03-15 12:08:04 +00:00
Jorge A. Torres d9013d4737
Do not trigger 'pre_update' logic for HPOS option when value remains unchanged (#45604)
* Add changelog

* Do not trigger pre_update logic for HPOS setting when not actually
changing value
2024-03-15 12:46:15 +01:00
Jorge A. Torres 72cb02ac47
Try to account for and re-create backup posts when syncing orders (#45332) 2024-03-15 12:31:14 +01:00
Patricia Hillebrandt 488bb62d82
[CYS on core] Introduce the Transitional page, i2 (#45546)
* Update the transitional page.

* Update icons

* Remove unnecessary div class

* Update the styles for the transitional page.

* remove the editor param

* conditionally display the survey button

* Additional layout changes

* Streamline the classes for the icons

* Import brush and tag from wordpress/icons

* delete the custom icons from Woo as they already exist on wordpress/icons and can be imported from there.

* Update styles for adding support to mobile view.

* Update the lesson-plan icon.

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

* Update e2e tests to account for the changes made to the transitional page.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 12:27:08 +01:00
Néstor Soriano fb32ab6c5a
Exclude the Legacy REST API plugin from the feature compatibility UI (#45610) 2024-03-15 11:44:17 +01:00
Alba Rincón ad8f76b2e9
[CYS] Fix the failed to load resource error in the CYS whenever the current active theme is not TT4 (#45519)
* Install and activate the TT4 before any other step on the loader

* Show the loader while activating the theme

* Try running steps together in parallel

* Try to run install and global styles in the same function

* Handle when the active theme returns null

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

* Add retries and types to fix lint errors

* Fix lint errors

* Fix more lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 11:09:31 +01:00
Luigi Teschio 21d4fd7786
CYS - Core: fix wp-admin page visible when click on start designing (#45586)
* CYS - Core: fix wp-admin page visible when click on start designing

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

* not show wp-admin after the click on the dialog button

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 08:17:20 +00:00
Matt Sherman afe0e0724b
Product Editor: Handle loading of product editor when global settings are not available on initial render (#45490)
* Do not pass settings from global down to editor; let BlockEditor handle loading settings itself

* Changelog

* Changelog
2024-03-14 13:02:40 -04:00
Christopher Allford 23a148aa18
Added Result Count Client Navigation (#45556)
Since the product collection block uses the interactivity router,
it reloads the page in the background and replaces sections
with a `data-wc-navigation-id` set. This adds the attribute
to the count block so that it can also live reload regardless
of where it is in the tree.
2024-03-14 09:48:02 -07:00
Niels Lange e91be1a458
Disable checkout menu when checkout block is default (#45538)
* Disable checkout menu when checkout block is default

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 15:42:59 +01:00
Thomas Roberts 5cbb0ad5bf
[Experimental] Add E2E tests for Additional Checkout Fields (#43836)
* Add additional-checkout-fields-test-helper wp-env plugin

* Ensure Checkout page waits for email to be visible before filling

* Handle additional fields in checkout page utils

* Add test for filling additional checkout fields

* Add additional check for gov-id validation

* Close context used for plugin-checking

* Update types for additional fields to be key/value objects

* Check billing gov-id is different to shipping one

* Move additional fields plugin to inline with checkout tests

* Use additional fields plugin from local dir

* Await email input to check Checkout block is loaded

* Add test to verify error message shows when leaving a field blank

* Update comment

* Add test for checking/unchecking checkboxes

* Update check in additional field test plugin

* Change fields multiple times in one test

* Add server-side validation tests

* Get exact matches for checkout form fields

* Remove unnecessarily translated strings

* update hook in test plugin to compare to confirmation gov id

* Fill in gov ID confirmation field

* Register a field of each type in each location

* Don't validate field unless both are filled

* Fill additional fields and check their values

* Fill additional fields

* Check select values in order confirmation

* Change the values of all field types multiple times

* Make checkout wait until not calculating before submitting

* Update tests to use all additional field types

* Blur after editing select box

* Add customer area checks

* Check shipping isn't calculating before submitting

* Add merchant-side tests for additional checkout fields

* Ensure customer data is done updating before submitting

* use waitForFunction to check for updating shipping

* Add changelog

* Ensure fields are blurred before pressing button

* Update validation error check

* Add test for logged out shopper

* make specific function to wait for checkout to be finished updating

* Add test to ensure fields are saved across orders

* Add sanitize and validate callbacks to gov id fields

* Make purchase type select field required

* Add sanitization test

* Use experimental function in test plugin

* Add standalone sanitization filter test

* Update testing plugin to use new and renamed filters

* Fix typo

* Move empty value test to logged out shopper block and check empty val

* Update tests to include tests for new validation/sanitization filters

* Add verifyAdditionalFieldsDetails function to checkout page

* Use new verifyAdditionalFieldsDetails function to improve readability

* Update second test to use new function to improve readability

* Update third test to improve readability

* Update fourth function to improve readability

* Update fourth test to improve readability

* Update guest shopper test to be more readable

* Update helper function to only return value not assert

* Remove check causing test to fail in CI

* Make check for guest shopper same as logged in

* Move guest shopper tests to their own file

* Ensure unchecking checkbox works OK
2024-03-14 13:39:30 +01:00
Niels Lange a7383579be
Allow usage of block notice templates when using classic themes (#45164)
* Allow block notice templates in classic themes

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

* Fix e2e constants file

* Improve inline comments

* Add filter and enhance e2e tests

* Adjust test names

* Adress PHP lint errors

* Adress PHP lint errors

* Adress PHP lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 19:33:33 +07:00
RJ 59635fb4c8
add: update onboarding task list copies and illustrations (#44854) 2024-03-14 15:20:31 +08:00
Patrick Rauland 72f75edf58
Adding accessible markup to sale price. (#44413)
* Adding accessible markup to sale price. See #31099

This PR adds accessible markup to the sale price.

A user who only uses screen reader software can now hear and understand the original price as well as the current price.

This is important for accessibility.

Full issue: https://github.com/woocommerce/woocommerce/issues/31099

* Improving sale price string formatting & localization #31099

This PR merges in feedback from the WooCommerce team.

* Improving string translation & output. Giving RTL languages more customization with the price in the translatable string.
* Formatting regular price & sale price at the top and then inserting into the HTML below. This prevents some sloppy logic where you might print out a blank del or ins tag.

* Swapping esc_html & sprintf #31099

Reversed the esc_html() and sprintf(). This is intentional because if translations accidentally include some HTML, that could break things.

Also, stripping HTML tags in $formatted_regular_price so that the end result in the screen-reader-text span is just plain text.

* Adjusting white space #31099

Mostly removing white space for the lint checker

* Adding translator comments #31099

Adding translator comments for lint

* Add changelog

* Fix some PHPCS violations

* Fix unit tests

* Adjust E2E test

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-03-13 20:43:44 -03:00
Jorge A. Torres b3c328d4e4
[HPOS CLI] Add support for backfilling specific properties or metadata (#45171)
* `wc hpos diff` command enhancements

* Add support for partial backfills to LegacyDataHandler

* Add unit tests

* Add support for partial backfills to `wp wc hpos backfill` CLI tool

* Add changelog

* Augment update_order_from_object() with args parameter

* Implement update_order_from_object() for HPOS

* Simplify partial backfill logic in LegacyDataHandler

* Move prop name validation to legacy data handler

* Apply changes to order before passing to backfill functions

* Simplify update_order_from_object() in HPOS datastore

* Simplify order update from object across datastores

* Undo change

* Minor fix for CPT version (which only takes order differences into account)

* Improve readability around ‘woocommerce_orders_table_datastore_should_save_after_meta_change’ filter

* Commit docblock suggestion

* PHPCS fixes

* Enhance unit test
2024-03-13 19:29:49 -03:00
Maikel Perez 0fc75c5148
Remove Custom Fields for New Product Editor (#45493)
* Add remove custom field for the new product editor

* Add changelog file

* Show add button when the custom fields are empty

* Ensures to always convert the metas into a string array since it can be anything

* Add changelog file
2024-03-13 19:16:12 -03:00
Barry Hughes 3f1dbd5b13
Switch from "invoice" to "order details" in our emails. (#45395)
* Switch from "invoice" to "order details" in our emails.

* Revise default order details email subject text.

* Revise default order details header text.

* Bring E2E check up-to-date with latest text revision.

* Update API tests to match order detail email changes.

* Fix typo

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-03-13 19:34:39 +00:00
Roy Ho 5933945127
Bump woocommerce-sniffs to 1.0.0 for WPCS 3.0 support (#45533)
* Bump woocommerce-sniffs to 1.0.0 for WPCS 3.0 support

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 13:22:16 -03:00
jonathansadowski be787742e1
Add WCA config json to changes config for CI (#45524)
* Add json config files to ci changes config

* Add admin config to Woo plugin ci config

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 10:29:34 -05:00
Alba Rincón e8e2c5d554
Show the "Design your own" banner when editing a theme which is not TT4 (#45481)
* Show the "Design your own" banner when editing a theme which is not TT4

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

* Fix lint errors

* Pass the active theme to the context

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 14:55:04 +01:00
Nathan Silveira 8bef21dbc3
Add set_attribute method to Block class (#45523) 2024-03-13 10:13:02 -03:00
Tung Du 50beebe3e5
[Experimental] Display the formatted price in price filter text input fields (#45409)
* fix: display the formatted price in price filter text input fields

* chore: changelog

* Display formatted price within the Product Filter: Price input fields

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-03-13 09:47:36 -03:00
Veljko V 60aa614b98
Add E2E test for Merchant Checkout Block flow (#45449) 2024-03-13 14:28:21 +02:00
Paul Sealock 2f88da580f
Task List: Avoid fetching tasks on non-visible lists (#45498) 2024-03-13 23:18:17 +13:00
Niels Lange 6b07ca44f5
Add totalValue filter (#45170)
* Add totalValue filter

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

* Remove nowrap to prevent text overflow

* Start docs for ‘totalValue’ filter

* Fix *.md lint issues

* Ignore .md lint errors for now

* Update code example and add screenshots

* Fix failing JS unit tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 00:42:24 +07:00
Fernando Marichal 55ec9eca2d
Add source property to legacy editor (#45515)
* Add source property to legacy editor

* Add changelog
2024-03-12 13:40:01 -03:00
Leif Singer a917efc44e
Add the ability to search for a currency by ISO code (#45512)
* Fix - #33503

Added ISO code along with the string. So it can be searched by using country code.

* Fixing linting issues

Added space with single quote to fix linting issue.

* fix linting issues

* add changelog file

* use emdash for separating data

* update test to new format

* include ISO code in settings test fixture

---------

Co-authored-by: daniyal.ahmad1992@gmail.com <daniyal.ahmad1992@gmail.com>
2024-03-12 17:32:32 +01:00
Fernando Marichal 1c068ce3a4
Update Attributes tooltip copy (#45485)
* Change attributes tooltip copy

* Add changelogs
2024-03-12 12:58:49 -03:00
Luigi Teschio 10005111c6
CYS - reduce editor instance re-render (#45458)
* CYS - reduce editor instance re-render

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

* fix crash when currentTemplate is undefined

* fix ts error

* remove unused import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-12 15:05:12 +01:00
Leif Singer 15855b55a3
Add a filter `woocommerce_admin_terms_metabox_datalimit` to change the data-limit value for the attributes term box (#45506)
* Update html-product-attribute-inner.php

Add a new filter `woocommerce_admin_terms_metabox_datalimit` to change the value of data-limit. See #37548 for more context.

* Update html-product-attribute-inner.php

* Creating a changelog file again

* update @since tag

* tweak changelog file wording

---------

Co-authored-by: Saif H. Hassan <67080558+Babylon1999@users.noreply.github.com>
2024-03-12 13:22:48 +00:00
Leif Singer 28e7351180
Fix the `test_widget_renders_completed_task_count` unit test (#45509) 2024-03-12 12:22:38 +00:00
Sam Seay 4cd89e4beb
Blocks Playwright tests: Add tests for the new attribute filter block (#45333) 2024-03-13 00:15:05 +13:00
Patricia Hillebrandt 4933b86cc7
[CYS on core] Update the WooCommerce Extensions Themes page to include references to the CYS (#45468)
* Introduce the new 'Design your own' button in the themes screen.

* unify the SCSS margins

* Add double quotes for woocommerce-marketplace__sub-header

* Add the CYS banner to the marketplace.

* Ensure each child in a list should have a unique 'key' prop

* Update the NoAIBanner component to direct users to the CYS flow.

* Add the customizeStoreDesignUrl const

* Ditch navigateOrParent

* Add the 'Browse the WordPress.org theme directory to discover more' link.

* Ensure the warning Modal is displayed whenever the user clicks on the 'Design your own' button and their current active theme is not TT4

* Remove the unnecessary fragment

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

* Fix lint.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-12 11:03:08 +01:00
Paul Sealock 172bbac661
Remote Specs: Update endpoints to 2.0 (#45298) 2024-03-12 15:53:59 +13:00
Paul Sealock e16a644e86
Launch Your Store: Add useLaunchYourStore helper method (#45404) 2024-03-12 12:50:22 +13:00
Paul Sealock ca2c12e667
Feature flags: Update config on watch (#45329) 2024-03-12 12:17:32 +13:00
Moon f061323d26
Tax task - Make postcode optional for countries without postcodes (#45367)
* Set field IDs

* Validate post code only when it is actually required

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

* Remove unused import

* Update test snapshot

* Update test snapshot

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 14:22:40 -07:00
Moon f901f60e4c
Update mercado pago payment copy (#45364)
* Update mercado copy

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 13:42:23 -07:00
Christopher Allford 1e7b8c4004
Product Collection: Added `priceRange` PHPUnit Tests (#45363) 2024-03-11 10:15:09 -07:00
99w 0b6259edfd
Add filter to allow changing order stock reservation minutes (#45246) 2024-03-11 17:46:05 +01:00
Maikel Perez 3658ac2d0e
List Custom Fields for New Product Editor (#45360)
* Create woocommerce/product-custom-fields block

* Register woocommerce/product-custom-fields block

* Add product-custom-fields block to the simple product template

* Create useCustomFields hook

* Create empty state

* Create CustomFields component

* Add custom fields table

* Add custom field remove button

* Hide the custom fields table base on the toggle value

* Remove non list features

* Add changelog files

* Fix linter errors

* Fix empty state styles

* Fix php linter error

* Remove context from the woocommerce/product-custom-fields-toggle-field block definition since it is not used

* Change url for the Read more about custom fields
2024-03-11 11:48:55 -03:00
Maikel Perez 0a90499e7b
Custom Fields for New Product Editor (#45291)
* Register metaboxhidden_product user meta as a user rest field

* Create useMetaboxHiddenProduct to manage the user metaboxhidden_product meta field

* Create woocommerce/product-custom-fields-toggle-field block

* Register woocommerce/product-custom-fields-toggle-field block

* Create product-custom-fields feature flag

* Hide custom fields behind the product-custom-fields feature flag

* Add changelog files

* Get default postcustom user meta value when the metaboxhidden_product does not exist yet in the user object
2024-03-11 10:55:31 -03:00
Alba Rincón cb7e1c2eb5
[CYS] Fix the Opt-in modal buttons and checkbox styles (#45444)
* Fix the CYS Opt-in modal buttons and checkbox styles

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 12:30:47 +01:00
Tommy Ferry 7fe00de727
Add product archive header template and re-hook (#33681)
* Add product archive header template and re-hook

Moves the product taxonomy archive header into its own template file,
creates a related output function, and then re-hooks the new template
back into the archive-product.php file in the same place, via the
'woocommerce_before_main_content' hook, priority 40.

This is so that this template part can be removed/unhooked via the
'remove_action' function, which is a cleaner approach than template
overrides or additional style changes.

Resolves: #33672

* add product archive header template changelog

* bump template versions

* bump template versions correctly

* add a new hook in the archive-product.php template for the header template
2024-03-08 15:33:40 -06:00
Tung Du 8e200a35b7
[Experimental] Fix minor issues of new filter blocks (#45305)
* fix: make the dropdown hidden by default

* fix: price clause

* fix: variable name in attribute clause generator

* chore: changelog

* fix: flashing issue for dropdown has selected items
2024-03-08 17:00:49 -03:00
Vlad Olaru ebd54a7c59
Update/default payments gateways recommendations (#39635)
* Update default gateways recommendations

* Add changelog entry

* Add Airwallex where missing
2024-03-08 20:24:32 +01:00
Leif Singer ba4260a344
Add callback URL domain to auth screen (#45445)
* add callback URL domain to auth screen

* add changelog file

* bump template version

* tweak wording
2024-03-08 20:14:20 +01:00
Alexandre Lara b162c9fab0
[Experimental] Product Filter: Price (Beta) block: Prevent invalid price range selection in Product Filter Price block (#45403)
* Prevent invalid price range selection in Product Filter Price block

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 16:08:20 -03:00
Bhupesh Mishra 319408bb67
changed filter by attribute filter options order (#44799)
* changed filter by attribute filter options order

In filter by attribute, order of the filter conditions "ALL" and "ANY" reversed as requested.

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 13:45:53 +01:00
Néstor Soriano 0432a8fd88
Add the plugin install engine (#44856)
* Add the PluginInstaller class

* Add changelog file

* Fix linting issues

* Changes in the installer:

- Allow installS from the WordPress.org directory only
- If the installer name is WooCommerce, throw if the caller is not
  in 'includes' or 'src' in WooCommerce core
- Remove two unnecessary includes
- Check if WP plugin upgrader classes already exist before
  executing the includes for them
- Get the installed plugin info using the plugin_info method
  of the plugin upgrader class

* Remove the get_installed_plugin_info method as it's no longer used

* Log plugin install only on sites with WooCommerce active
2024-03-08 07:29:41 -05:00
Jorge A. Torres 0da0e372d6
[HPOS CLI] Flush in-memory cache after each batch in migration (#44670) 2024-03-08 12:47:27 +01:00
Alba Rincón 1c9620b3be
[CYS] Show the default header and footers as the first option (#45414)
* Show the default header and footers as the first option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 12:03:19 +01:00
Luigi Teschio a57b322bd9
CYS: improve font installation with the async job (#45411)
* CYS: improve font installation with the async job

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 10:26:19 +00:00
Barry Hughes 6a910390a9
[Minor] Fix docblock/typo (#45405)
Fix docblock.
2024-03-08 10:53:12 +01:00
Chi-Hsuan Huang 10561c8c1a
Add default values for Launch your store task (#45306)
* Add LYS task default values

* Add changelog

* Add unit tests

* Init LaunchYourStore task only when feature flag is enabled

* Add action to woocommerce class

* Remove WCAdminHelper use

* Add lys options to permission list

* Set launch-status option

* Fix woocommerce_store_pages_only

* Use WC_Install::is_new_install() instead

* Use woocommerce_newly_installed action

* Check if feature flag is enabled

* Use singleton WooCommerce object in tests

---------

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2024-03-08 17:27:46 +08:00
Luigi Teschio 913953f586
CYS: fix Undefined array key queryId warning (#45399)
* CYS: fix Undefined array key queryId warning

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 10:02:41 +01:00
Karol Manijak a3811fa007
Product Collection: Set initial value of Created filter for New Arrivals collection (#45355)
* Set initial vlaue of Created filter for New Arrivals collection

* Add changelog

* Remove a check for products in tests as they may not really be displayed

* Adjust the New Arrivals test

* Adjust the tests logic after the change

* Bring back previous formatting

* Bring back function closure removed by mistake
2024-03-08 08:33:21 +01:00
Niels Lange ba85f36219
Unskip Mini Cart i18n test (#45371)
* Unskip Mini Cart i18n test

* Install language packs before each i18n-related test suite

* Delete translations.sh

* Add changelog

* Replace deprecated WP-CLI command

* Remove obsolete WP-CLI command
2024-03-08 12:39:22 +07:00
Moon 1f914c755e
Add Launch Your Store settings section (#45402)
* Support div setting type

* Add wc_settings_general_site_visibility_slotfill slotfill

* Add site visibility setting section

* Add placeholder

* Rename div to slotfill_placeholder

* Add comment

* Fix component name

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

* Use unique id

* Rename option names

* Put LYS settings behind launch-your-store flag

* Move Site Visibility header to component

* Lint fixes

* Lint fixes

* Use woocommerce-settings scope

* lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 04:11:52 +00:00
Jorge A. Torres f229c3d765
Prevent backup post from being deleted when HPOS is authoritative (#45330)
This PR short-circuits wp_delete_post() so that when HPOS is authoritative, any attempts to delete the backup post are not successful (which could also end up deleting the HPOS order). This only applies to non placeholder posts, as placeholder posts won't trigger the cascade of operations that might be problematic here.

Fixes #42746
2024-03-07 16:24:36 -08:00
Luigi Teschio 76e7d84523
[CYS] Improve logic to ensure that the font is active (#45385)
* improve logic to ensure that the font is active

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-07 18:44:01 +00:00
Alba Rincón 60d93e447f
[CYS on core] Set the default width after logo update (#45384)
* Set default width after logo update

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-07 15:13:31 +01:00
louwie17 d6cbbfb4d2
Add simple products to the Analytics orders query for the attributes filter (#44901)
* Add subquery for simple products

* Update query to make use of product lookup instead

* Add changelog

* Revert change

* Update PHP tests and fix lint errors

* Move subquery out to its own variable to make it more readable
2024-03-07 10:52:38 -03:00
Bart Kalisz 211b6ef01b
Blocks E2E: Be more descriptive with the workflow job titles (#45381) 2024-03-07 13:32:29 +00:00
Bart Kalisz 9a14411937
Blocks E2E: Allow manually triggering the workflow (#45382) 2024-03-07 14:01:22 +01:00
Bart Kalisz 8ff89fa6db
Blocks E2E: Do not report slow tests (#45375) 2024-03-07 12:57:48 +01:00
Walther Lalk c509f424dc
Allow extensions in Add Products task (#44892)
* Add POC for tasklist product types extensibility

* Replace create product with custom onClick when it exists

* Don't include dummy plugin

* Remove dummy file

* Cleanup product type filter for tasklist

* Create unit test for product type filter

* Added changelog

* Move changelog file

* Is Enhancement

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

* Delete plugins/woocommerce/changelog/extend-product-task

* Fix lint errors

* Apply suggestions from code review

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

* CR responses

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-03-07 10:04:10 +00:00
Néstor Soriano 564fd47ef7
Adjust the WC_Admin_Notices to support multisite setups (#45349)
Previously there was one single locally cached instance of the notice names array that wasn't aware of switch_to_blog executions. Now in multisite setups one separate array is kept for each existing blog id.
2024-03-07 10:54:35 +01:00
Luigi Teschio 77f8716c78
CYS: fix the footer large pattern - use only one navigation block (#45308)
* CYS: fix footer large pattern - use only one navigation block

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-07 09:08:08 +00:00
Christopher Allford 65fe267f32
Product Collection: Added `featured` PHPUnit Tests (#45359) 2024-03-06 14:24:10 -08:00
Alexandre Lara 8163b83bf7
Price Filter: Fix styling issue when Inline input fields is enabled (#45197)
* Fix styling issue in the Editor when Inline input fields is enabled

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

* Fix styling issue on the Frontend when Inline input fields is enabled

* Fix css lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-06 17:10:12 -03:00
Alexandre Lara be9b3ab4f0
Filter blocks: Add block preview (#45258)
* Add block preview to filter blocks

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-06 16:55:04 -03:00
Alexandre Lara bbd2e50a53
Product Filter - Price (Beta) block: Fix Filter is not applied when using the numeric inputs (#45327)
* Add missing `name` attribute to min and max input fields

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-06 16:43:13 -03:00
Luigi Teschio 26c19fa1f8
Revert "[e2e tests blocks] Configure the number of shards for each ma… (#45324)
* Revert "[e2e tests blocks] Configure the number of shards for each matrix project (#45212)"

This reverts commit 72789656cf.

* trigger CI

* run E2E tests

* restore ci.yml file

* trigger E2E tests

* disable E2E tests about mini cart translations

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

* Fix the setupAndFetchQueryContextURL utility

* add comment

* Remove obsolete test

* Blocks E2E: Update timeout values (#45353)

Set timeout values same as core

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-03-06 16:52:37 +00:00
Justin Palmer 56d087f536
Hide unnecessary order attribution details (#44907)
* Hide more details for simple sources
2024-03-06 11:25:01 +01:00
Tung Du 2cfd120f15
[Experimental] Fix: add an unique id to each list item to prevent diffing issue (#45304)
* fix: add an unique id to each list item to prevent diffing issue

* chore: changelog
2024-03-06 10:36:20 +07:00
Christopher Allford e2ed2a9fdb
Removed Product Collection Unique ID (#44625)
With the availability of other unique characteristics
for identifying collection blocks, it is no longer necessary
to keep this attribute. Since it has not been used it is safe
to remove it without a deprecation cycle.
2024-03-05 14:08:17 -08:00
Alba Rincón 1c68e2dd9f
[CYS] Fix the selected pattern in footer, header and homepage (#45240)
* Check also the number of inner blocks before checking the attributes

* Add classes to assembler footer patterns

* Add classes to assembler header patterns

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

* Mark the current homepage template as selected

* Remove unused import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-05 18:21:44 +01:00
github-actions[bot] e549712ebf
Delete changelog files based on PR 45252 (#45319)
Delete changelog files for 45252

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-03-05 23:43:44 +08:00
Maikel Perez 33d38be479
Add Post-purchase note field to the Inventory tab (#45244)
* Add Post-purchase note field to the Inventory tab

* Add changelog file
2024-03-05 11:12:31 -03:00
Seghir Nadir 9f7a6779f6
Fix styling for select in Site Editor (#45252)
* Fix styling for select in Site Editor

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-05 14:49:33 +01:00
github-actions[bot] 25d24509b8
Delete changelog files based on PR 45249 (#45312)
Delete changelog files for 45249

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-03-05 21:19:44 +08:00
Patricia Hillebrandt ed624844f8
[CYS on Core] Ensure the user is directed to the in app marketplace whenever clicking on 'Browse all themes' (#45288)
* Ensure the user is directed to the in app marketplace whenever clicking on 'Browse all themes' on core.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-05 10:15:09 +00:00
Patricia Hillebrandt 298cddf5a4
[CYS on Core] Display the theme switch modal only if the current active theme is not TT4 (#45296)
* Ensure the active theme switch modal is displayed only if the theme is different than TT4

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-05 10:11:31 +00:00
Tung Du 91272dde6f
[Experimental] Fix: regression introduced in #44757 that breaks the inspector settings of the new attribute filter block (#45276)
Fix: regression introduced in #44757 that breaks the inspector settings of the new attribute filter block
2024-03-05 11:09:36 +07:00
Chi-Hsuan Huang 6490682366
Add "launch your store" task (#45270)
* Add launch your store task

* Update tasklist header style

* Add changelog
2024-03-05 10:43:32 +08:00
Luigi Teschio 6a30974ad4
Fix activeThemeHasMods undefined error (#45255)
* Fix activeThemeHasMods undefined error

* remove comment

* fix naming

* improve comment

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-04 19:09:36 +00:00
Ron Rennick 4fd7273088
More block package cleanup (#45256)
remove nvmrc, add to gitignore

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-03-04 10:27:58 -08:00
Thomas Roberts 5d808ad9fc
Restore "No shipping options were found" message in cart-shipping template. (#45249)
* Check if $available_methods is not empty, rather than isset

This encompasses two checks in one, it encompasses isset AND count( $available_methods ) > 0

* Bump template version

* Add changelog entry

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-03-04 16:18:09 +00:00
Moon 70625490ae
Prevent fresh_site option from being set to 0 after WooCommerce installation (#45232)
* Prevent fresh_site option from being set to 0 after publishing default pages

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

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

* Typo fix

* Add is_site_fresh function

* Update comment

* Add a test for is_fresh_site

* Check fresh_site option first

* Add test for checking fresh_site=1

* Fix lint errors

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-04 07:57:16 -08:00
Alba Rincón 7e50f670b7
Fix intro CYS logo and site title (#45216)
* Fix intro CYS logo and site title

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

* Improve format

* Fix logo motion

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-04 12:34:47 +01:00
Jorge A. Torres 0d11d071ee
[HPOS CLI] Allow `--re-migrate` to be used even when `--verbose` is not set (#44669)
* Allow `—re-migrate` to work even when `—verbose` is not set

* Add changelog

* Docblock update

* Indicate that remigration was attempted in errors array
2024-03-04 17:00:58 +05:30
And Finally 2789f39bc7
Update example plugin in Activity Notes docs to correct further issues (#45158)
* Improves documentation of example plugins for WooCommerce Admin Notes.

- Adds namespacing for `Automattic\WooCommerce\Admin\Notes\Notes`.
- Uses namespacing in `class_exists` checks.
- Deletes duplicate code.

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

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

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

* added missing placeholders

* Update 43011-patch-1

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

* Re-trigger CI

---------

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

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

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

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

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

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

---------

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

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

* Fixed typo

---------

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

* Add changelog

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

This adds the discussion link in custom fields docs.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-01 16:44:34 +01:00
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