Commit Graph

21961 Commits

Author SHA1 Message Date
Nestor Soriano ca818aa2a9
Merge branch 'trunk' into add/add-changelog-file-tool 2024-09-25 16:32:57 +02:00
David Garcia Watkins bc56050569
[wcml-4848] Fixes for incorrect blocks in WC's refunds policy page (#51620)
* [wcml-4848] Fixes for incorrect blocks in WC's refunds policy page

Closes #51618

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-25 15:42:17 +02:00
Vladimir Reznichenko 3f4873bf3f
[dev] Monorepo: core build steps tweaks (copying assets) (#51612)
In this PR we aim to reduce filesystem modification when copying assets into the core by splitting copy tasks in three (one per source package) and using rsync over remove/copy combo.
2024-09-25 15:13:14 +02:00
Albert Juhé Lluveras 49fa0a7b1a
Allow setting the Shop page as the homepage in block themes (#51626)
* Allow settings the Shop page as the homepage in block themes

* Linting

* Add changelog file

* Fix SingleProductTemplateTests docblock

* Add unit tests

* Fix missing Shop page id

* Fix missing Shop page id (II)

* Fix missing Shop page id (III)

* Cleanup
2024-09-25 10:06:31 +02:00
Corey McKrill c4e758bab6
Redirect to canonical product permalink (#51637)
* Redirect to canonical product permalink

This ensures that if product permalinks are set to include the
%product_cat% replacement token, arbitrary values for that part of the
URL will redirect to the canonical product category value, rather than
successfully loading the single product page.

Fixes #24244

* phpcs exception

* Update plugins/woocommerce/changelog/fix-24244-custom-permalink

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-09-24 14:07:08 -07:00
Jonathan Lane 30ffbce09a
WC Cleanup plugin (#51593)
* WC cleanup plugin

* Fix linter errors

* More linter fixes

* Clean up spacing

* File doc comment

* Remaining linter problems

* Linter warnings too.  Sigh.

* Media cleanup, DB table cleanup, tax rate cleanup

* Exclude media files used in tests from cleanup

* Exclude media files regardless of extension

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-09-24 13:31:47 -07:00
Moon 12c2843458
Coming soon: Do not render header and footer if the theme does not support FSE (#51633)
* Render coming-soon template content without header and footer if the current theme is not a fse

* Check for store pages only

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

* Make sure get_the_block_template_html exist

* Lint fixes

* Lint fixes

* Lint fixes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-24 19:53:31 +00:00
louwie17 a979d95130
Replace setTimeout with callback function for more reliable E2E tests (#51653)
* Replace setTimeout with callback function for more reliable E2E tests

* Add changelog

* Remove removePreview logic from product collection page
2024-09-24 12:24:43 -03:00
github-actions[bot] 9f5bc4bc4e
Delete changelog files based on PR 51630 (#51656)
Delete changelog files for 51630

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-24 19:40:52 +07:00
Thomas Roberts 94460bb394
Check if the order needs shipping before validating shipping address (#51630) 2024-09-24 12:53:24 +01:00
Chi-Hsuan Huang 442cb4e81b
[Beta tester] Add tool for changing woocommerce.com base URL (#51537)
* Refactor WooCommerce Helper class

This commit refactors the WooCommerce Helper class in the `class-wc-helper.php` file. The changes include:
- Updating the comparison operator from `==` to `===` in the `activate_plugin` condition.
- Renaming the `get_install_base_url` method to `get_woocommerce_com_base_url`.
- Adding a new `get_install_base_url` method that returns the base URL for the plugin auto installer.

These changes improve the readability and maintainability of the code.

* Refactor data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion

- Refactor the data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion to use a dynamic base URL for the data sources.
- Update the deprecated DATA_SOURCES constant to an empty array in each class.
- Add a new method get_data_sources() in each class to return the updated data sources with the dynamic base URL.
- Modify the constructor of each class to use the get_data_sources() method instead of the deprecated DATA_SOURCES constant.

* Add changelog

* Add set-woocom-base-url tool

* Add changelog

* Rename woo_com and woocom -> wccom

* Change to falsy check !url

* Change woocom/WOOCOM to wccom/WCCOM

* Change default value to https://woocommerce.com/

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-09-24 19:37:57 +08:00
Jason Kytros 85a048f1fd
Resolved fatal error when applying Brands-restricted coupon (#51577)
* Resolved fatal error when applying Brands-restricted coupon

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-24 14:16:03 +03:00
github-actions[bot] 4858ae62aa
Delete changelog files based on PR 51631 (#51646)
Delete changelog files for 51631

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-24 18:01:46 +07:00
github-actions[bot] ccbd29054a
Release: Remove 9.4 change files (#51530)
Delete changelog files from 9.4 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-24 18:00:08 +07:00
github-actions[bot] 045d174fc0
Prep trunk for 9.5 cycle (#51529)
Prep trunk for 9.5 cycle with version bump to 9.5.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-24 17:59:48 +07:00
Manish Menaria a55812eba2
Product Collection: Update heading for Hand-Picked collection (#51643)
* Update heading for Hand-Picked collection

- Added 'recommend' to the keywords array.
- Changed heading content from 'Hand-Picked' to 'Recommended products'.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-24 16:14:07 +05:30
Vladimir Reznichenko bca89cb14f
[dev] pnpm install: speedup postinstall hooks a bit (#51538)
In this PR, we aim to improve the speed of ppm installs by making changes in ppm configuration and post-install hooks. The main principle behind the changes is to leverage the identified parallelization potential.
2024-09-24 08:34:46 +02:00
RJ 59aa209761
enhance/create wrapper for all external func using proxy (#51432)
* Create a wrapper function for all external dependency function calls for safety

* Add changelog

* Improve remote logger

* Update RemoteLogger.php

* Add changelog

* enhanced it to use proxy instead of individual wrappers

* lint

* lint 8

* Revert blocking=true change

* pr feedback

* fixed

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-09-24 10:49:47 +08:00
Barry Hughes 2a0ad34d99
Product CSV Importer > Restore expected default number of lines-to-import per batch (#51631)
Restore expected default number of lines-to-import per batch (product CSV import).
2024-09-23 14:46:01 -07:00
Tomek Wytrębowicz bef65063eb
Unhardcode menu titles for in page header (#51606) 2024-09-23 21:27:27 +02:00
Tomek Wytrębowicz 537818de6f
Ignore Analytics in the legacy `woocommerce_admin_reports` (#51592) 2024-09-23 21:11:56 +02:00
Mike Jolley 2c816457a9
Fix: get_checkout_fields() should return empty array if requested fieldset is not defined (#51508)
* If there is no fieldset, return an empty array instead of throwing notice

* changelog
2024-09-23 18:02:21 +02:00
Narendra Sishodiya 3ac409e03f
Fixed Fatal error call to a member function `is_empty() in mini-cart.php` (#51285)
* Fixed Fatal error call to a member function is_empty() in mini-cart.php:24

* Updated Template Version

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

---------

Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-09-23 17:59:47 +02:00
Joshua T Flowers 10b85cefb8
Only register block assets on the frontend during block render (#51517)
* Only register block assets on the frontend during block render

* Add changelog entry

* Add wc-blocks-registry as a dependency to product collection tester script

* Update docs manifest
2024-09-23 11:39:33 -04:00
github-actions[bot] 9647db4bb6
Delete changelog files based on PR 51541 (#51616)
Delete changelog files for 51541

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-23 22:02:50 +07:00
Seghir Nadir 07a0b8477b
Fix visual inconsisties in Cart/Checkout between elements and between Light/Dark modes (#51585)
* darker outline and double outline on focus

* flip outlines for shipping selector

* fix select outline in dark mode

* Fix input labels being cut off due to line height

* adjust outline colors

* fix rest of problems in dark mode

* fix express payment on checkout

* Fix broken styles for shipping cart in medium

* Always center input label

* Fix order note background in dark mode

* remove empty space in payment methods when there's no content inside

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

* fix linter issues

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-23 14:11:43 +02:00
louwie17 217f01c991
Add product dataviews without new nav (#51581)
* Add styling for dataviews with old nav

* Add toggle to toggle between new and old navigation

* Update dataviews dependency

* Fix width for list view

* Remove unused type

* Add changelogs
2024-09-23 08:51:55 -03:00
Manish Menaria fc6c932b1c
Fix: Prevent "is-descendent-of-single-product-block" from being added to external product URLs. (#51369)
* Fix: Prevent adding hidden input to external product forms with URLs

This commit addresses an issue where a hidden input field was being added
unnecessarily to external product forms that already have a URL. The changes
include:

1. Adding a check to determine if the product is an external product with a URL.
2. Only adding the hidden input field for products that are not external
   products with URLs.

This fix ensures that external product forms with URLs maintain their intended
functionality without the addition of unnecessary form elements.

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

* Fix lint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-23 16:17:21 +05:30
Eason f9cf25e8d7
Legacy reports: Decouple the dependency between the legacy reports and the WooCommerce Status widget on the dashboard page (#51566)
* Reverse the dependency on drawing sparklines in the legacy reports from the WooCommerce Status widget on the dashboard page.

* Add a new class to simulate the loading plugin for the legacy reports.

* Decouple the dependency between the legacy reports and the WooCommerce Status widget on the dashboard page.

* Break down the method of forming HTML for the sparkline in Dashboard widget to avoid directly outputting HTML via a filtered callback.

* Update PHP unit tests for WC_Tests_Admin_Dashboard.

* Add changelog.

* Ensure the backward compatibility for the `woocommerce_after_dashboard_status_widget ` action.

Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768751063

* Fix the incorrect indentation of a modified line of codes in the `WC_Admin_Dashboard` class.

Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768690182

* Fix a PHP 8 deprecation message due to a required parameter after an optional parameter in the `WC_Admin_Dashboard` class.

Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768776896

* Tweak the inaccurate PHPDoc for the `get_sales_sparkline ` method in the `WC_Admin_Report` class.

Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768804777
2024-09-23 17:08:47 +08:00
Chi-Hsuan Huang 31d847bd6f
Allow change remote spec data source base URL via filter (#51532)
* Refactor WooCommerce Helper class

This commit refactors the WooCommerce Helper class in the `class-wc-helper.php` file. The changes include:
- Updating the comparison operator from `==` to `===` in the `activate_plugin` condition.
- Renaming the `get_install_base_url` method to `get_woocommerce_com_base_url`.
- Adding a new `get_install_base_url` method that returns the base URL for the plugin auto installer.

These changes improve the readability and maintainability of the code.

* Refactor data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion

- Refactor the data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion to use a dynamic base URL for the data sources.
- Update the deprecated DATA_SOURCES constant to an empty array in each class.
- Add a new method get_data_sources() in each class to return the updated data sources with the dynamic base URL.
- Modify the constructor of each class to use the get_data_sources() method instead of the deprecated DATA_SOURCES constant.

* Add changelog
2024-09-23 15:10:40 +08:00
Tomek Wytrębowicz e4d0123a36
Fix taxes totals mismatch at reports table (#51218) 2024-09-22 22:04:52 +02:00
Tomek Wytrębowicz 15bcbbdcfd
Fix Tax Analytics total results & export (#51270) 2024-09-22 21:05:23 +02:00
Karol Manijak 03749a0a40
Product Collection: Add option for current product as a reference (#51359)
* Introduce RadioControl

* Provide better copy and improve styling of radio button

* Implement the logic of choosing current product as a reference

* Add placeholder state in product chooser

* Add placeholder image to product chooser

* Add changelog

* Refactor file

* Improve the condition choosing the default radio value

* Update E2E tests

* Format SVG icon and optimize it

* Increase a gap in radio control

* Make the labels less spcific to related products

* Rename some variables to more meaningful names

* Show placeholder img if product doesnt have one

* Fix type

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-09-22 15:30:29 +05:30
Bart Kalisz 35ba49a1f2
Product Collection: Implement the Hand-Picked collection (#51141)
* Fixed PHP 7.4 Compatibility

The splat operator does not support associative arrays until PHP 8.1.

* Added Related Products Collection Boilerplate

* Added `woocommerceRelatedTo` Collection Parameter

This parameter allows the block to query for products that are related
to the given product IDs.

* Added Collection Related Product Filter

Using `woocommerceRelatedTo`, queries may restrict the products returned
to those that are related to the given product ID(s).

* Removed Unnecessary Tracking

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

* Removing Misunderstood Option

* Linting Fix

* Fixed Test

* Initialize the Hand-Picked collection

* Removed Unnecessary Keyword

* Render the collection-specific control

* try removing for fixing gh syntax hl

* add back

* tweak icon render

* combine conditions for early return

* Remove timeFrame from the query

* Set control label per context

* Use primitives for the icon

* Hide 'order by' control for the Hand-Picked collection

* Support Unlimited `wc_get_related_products()`

This changes related product fetching so that `-1` will return all
related products. I also removed a second +10 offset that seems
to have been accidentally added eight years ago.

* Revert "Set control label per context"

This reverts commit cd537befbe.

* Update titles and description

* Enable sorting by entered order

* Removed `woocommerceRelatedTo` Param

Since we're going to use the collection name, we don't need
this functionality any longer.

* Simplified `post__in` Filtering

Since `merge_queries` was already using an intersection merge for
`post__in`, this second function is unnecessary. I've removed it
as well as refactored the merging logic.

* Pass Collection Name To Final Query

* Improve the query merging logic

* Added Custom Collection Handlers

Developers can register collections along with handlers that implement
the custom behavior.

* Removed Second Test Query Construction

As it was, `build_query_vars_from_query_block()` was triggering the
ProductCollection instance hooked into WordPress. After that, we
called `build_frontend_query()` on our test instance. This caused some
weird behavior in tests. As a result, however, the tax_query merge
test couldn't rely on the tax_query transformation done by WordPress.

* Added Related Product Collection Handlers

* Revert "Support Unlimited `wc_get_related_products()`"

This reverts commit 41c837202e.

* Fixed Preview Mode Query

It looks like we were checking the wrong place for the preview
state.

* Improve the query merging logic

* Fixed Test

* Updated Collection Heading

* Handle collection context / no results state

* Small cleanup

* Better Collection Test Teardown

Passing a callable back means that we can use variables in the
setUp and then the tearDown without any confusion.

* Removed Unnecessary Test Provider

* Fixed `$post__in` Merging

When the intersection is empty it was returning all products. This
makes it so that it returns nothing when there's no results.

* Set perPage to 0 and add Pagination block for better discoverability

* Improve empty state in Editor by providing meaningful instruction

* Make code more defensive

* Hide more filters in scope of handpicked through hideFilters API

* Fixed PHPDoc

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* Hide Empty Related Product Collections

* Removed Duplicate Query Function

* Added Hand-Picked Collection Handler

* Revert changes to pnpm

* Improve comment for empty Hand-Picked collection

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

* Fix: Pagination not working on Frontend

Remove perPage and pages attributes from hand-picked collection

* Remove unused code

* Revert "Improve empty state in Editor by providing meaningful instruction"

This reverts commit 9ac5c20d5e.

* Do not apply layout styles for empty results

* Improve the wording on the empty results message

---------

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-09-21 20:10:10 +05:30
Karol Manijak 6222124793
Add Upsells collection (#51374)
* Fixed PHP 7.4 Compatibility

The splat operator does not support associative arrays until PHP 8.1.

* Added Related Products Collection Boilerplate

* Added `woocommerceRelatedTo` Collection Parameter

This parameter allows the block to query for products that are related
to the given product IDs.

* Added Collection Related Product Filter

Using `woocommerceRelatedTo`, queries may restrict the products returned
to those that are related to the given product ID(s).

* Removed Unnecessary Tracking

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

* Removing Misunderstood Option

* Linting Fix

* Fixed Test

* Removed Unnecessary Keyword

* Support Unlimited `wc_get_related_products()`

This changes related product fetching so that `-1` will return all
related products. I also removed a second +10 offset that seems
to have been accidentally added eight years ago.

* Removed `woocommerceRelatedTo` Param

Since we're going to use the collection name, we don't need
this functionality any longer.

* Simplified `post__in` Filtering

Since `merge_queries` was already using an intersection merge for
`post__in`, this second function is unnecessary. I've removed it
as well as refactored the merging logic.

* Pass Collection Name To Final Query

* Added Custom Collection Handlers

Developers can register collections along with handlers that implement
the custom behavior.

* Removed Second Test Query Construction

As it was, `build_query_vars_from_query_block()` was triggering the
ProductCollection instance hooked into WordPress. After that, we
called `build_frontend_query()` on our test instance. This caused some
weird behavior in tests. As a result, however, the tax_query merge
test couldn't rely on the tax_query transformation done by WordPress.

* Added Related Product Collection Handlers

* Revert "Support Unlimited `wc_get_related_products()`"

This reverts commit 41c837202e.

* Fixed Preview Mode Query

It looks like we were checking the wrong place for the preview
state.

* Fixed Test

* Updated Collection Heading

* Add Upsells collection definition

* Register Upsells

* Add collection handlers for Upsells

* Add changelog

* Remove on sale query param

* Better Collection Test Teardown

Passing a callable back means that we can use variables in the
setUp and then the tearDown without any confusion.

* Removed Unnecessary Test Provider

* Added Upsell Collection Unit Test

* Product ID Confidence Check

* Added Collection Product Reference

* Don't display Upsells collection if there's no upsells

* Change the Upsells collection heading

* Add Upsells supporting cart context

* Consume the cart productIds and display Upsells in there

* Fixed `$post__in` Merging

When the intersection is empty it was returning all products. This
makes it so that it returns nothing when there's no results.

* Fix lint

* Extract the variable

* Fix lint

---------

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-09-21 19:28:47 +05:30
Christopher Allford 7a7b94025a
Product Collection: Introduce "Related Products" Collection (#51076)
* Fixed PHP 7.4 Compatibility

The splat operator does not support associative arrays until PHP 8.1.

* Added Related Products Collection Boilerplate

* Added `woocommerceRelatedTo` Collection Parameter

This parameter allows the block to query for products that are related
to the given product IDs.

* Added Collection Related Product Filter

Using `woocommerceRelatedTo`, queries may restrict the products returned
to those that are related to the given product ID(s).

* Removed Unnecessary Tracking

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

* Removing Misunderstood Option

* Linting Fix

* Fixed Test

* Removed Unnecessary Keyword

* Support Unlimited `wc_get_related_products()`

This changes related product fetching so that `-1` will return all
related products. I also removed a second +10 offset that seems
to have been accidentally added eight years ago.

* Removed `woocommerceRelatedTo` Param

Since we're going to use the collection name, we don't need
this functionality any longer.

* Simplified `post__in` Filtering

Since `merge_queries` was already using an intersection merge for
`post__in`, this second function is unnecessary. I've removed it
as well as refactored the merging logic.

* Pass Collection Name To Final Query

* Added Custom Collection Handlers

Developers can register collections along with handlers that implement
the custom behavior.

* Removed Second Test Query Construction

As it was, `build_query_vars_from_query_block()` was triggering the
ProductCollection instance hooked into WordPress. After that, we
called `build_frontend_query()` on our test instance. This caused some
weird behavior in tests. As a result, however, the tax_query merge
test couldn't rely on the tax_query transformation done by WordPress.

* Added Related Product Collection Handlers

* Revert "Support Unlimited `wc_get_related_products()`"

This reverts commit 41c837202e.

* Fixed Preview Mode Query

It looks like we were checking the wrong place for the preview
state.

* Fixed Test

* Updated Collection Heading

* Better Collection Test Teardown

Passing a callable back means that we can use variables in the
setUp and then the tearDown without any confusion.

* Removed Unnecessary Test Provider

* Fixed `$post__in` Merging

When the intersection is empty it was returning all products. This
makes it so that it returns nothing when there's no results.

* Fixed PHPDoc

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* Hide Empty Related Product Collections

* Fix lint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-09-21 16:12:58 +05:30
Herman 62a2968afd
Add screen reader text for ratings data on product cards (#51571)
* Add screen reader text for ratings data on product cards

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-20 16:57:45 +00:00
Thomas Roberts fa977c2da1
Replace flaky Local Pickup e2e test with PHP and JS unit test (#51554) 2024-09-20 17:25:19 +01:00
Raja sekar 017d649ae7
Show correct decimals on product price and show the sale price of products (#51499)
* add regular price and sale price flag to product apis and types

* add sale price and screen reader text for prices on product cards

* fix typo on sale flag

* add regular price and sale price flag to product apis and types

* add sale price and screen reader text for prices on product cards

* fix typo on sale flag

* Changelog.

* address feedback on sale price VO text

---------

Co-authored-by: Herman <KokkieH@users.noreply.github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2024-09-20 21:13:01 +05:30
Mike Jolley aacae66eb0
Delayed account creation: Admin settings (#51236)
* Settings first pass

* New Settings UI

* Respect woocommerce_enable_delayed_account_creation at block level

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

* Check input exists

* Add new setting to tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-20 16:20:09 +01:00
Vlad Olaru 1ff28fd174
Update Payments menu item display and linking behavior (#51541)
* Minor cleanup

* refact: Rename must_be_visible to is_incentive_visible for clarity

* refact: Rename register_payments_welcome_page to register_menu_and_page for clarity

* Don't show the incentive page if the user can't manage WC

* Introduce menu item when no incentive

* Don't recommend additional gateways when WCPay is present

* Render gateway suggestions on the WCPay task page, also

* Add changelog entry

* Remove short array syntax

* Lint fixes

* Simplify Payments task view logic

* Simplify WooPayments task view logic

* Improve WooPayments task complete logic

* WooPayments can't be connected or onboarded if it is not active

* refact: Rename private static method

* Improve logic to determine the Payments task slug by factoring in the extended task list also

* docs: Add details about our use of the Payments task logic

* Add type hint

* Do not recommend offline methods when WooPayments is supported

* On suggestion enablement redirect to the same task page

* Lint fixes

* test: Fix unit tests

* Maintain deprecated navigation logic
2024-09-20 15:53:10 +03:00
David Allsop ad2d18200f
Add additional body class for the account dashboard (#30050) (#51147)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2024-09-20 11:21:33 +02:00
Mike Jolley 9c58f198cf
Ensure `QuantityLimits::limit_to_multiple` receives correct values to prevent fatal errors (#51451)
* Ensure values passed to limit_to_multiple are integers

* changelog

* Type and value enforcing for filters

* fix max value
2024-09-19 16:24:13 +01:00
Mike Jolley d567c6c698
Delayed Account Creation: Support option to send password setup link to customer via email (#51227)
* Update form handling to work with automatically generated passwords

* Keep user logged in after password reset.

* Ignore comments for hooks in changed method

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

* Checkmark list style

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-19 15:03:27 +01:00
Mike Jolley c5ed90535f
Fix script tag handling for inner blocks in the cart (#51498)
* Avoid parsing scripts when dealing with inner blocks—return as-is

* changelog
2024-09-19 14:51:09 +01:00
Mike Jolley bf549e6d8f
Defend against missing session in cart functions to prevent fatals (#51442)
* Ensure session is callable in cart functions

* Changelog
2024-09-19 13:36:54 +01:00
Cem Ünalan 8ca18f06ad
Marketplace: hide the scrollbar from the category selector (#51527)
* Marketplace: hide the scrollbar from the category selector

Also fixed some button gradient issues

* Marketplace: change scroll helper button cursor

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-19 12:26:06 +00:00
Veljko V. ec9cdbdbf7
Fix and improve k6 perf test My Account Open Order (#51334)
* Add customer id to orders and update test to look for proper title

* Add changelog

* Update my account open orders test and assign customer ID

* Fix linting issues

* Add final fix to the my account open order test

* Add customer order to test

* Add comment on the top of the file

* Add two more comments to the top of the file to avoid linting failure

* Revert changes made to response in test and orders

* Rename response to r in orders

* Remove unnecessary code from orders

* Move order creation to setup and update tests

* Include check for the order ID validation

* Relogic add customer order

* Rename test comment

* Update setup to create customer and config, readme, relevant tests

* Remove console log from the test
2024-09-19 11:14:20 +02:00
louwie17 11b1e31ac3
Update the dataviews package dependency (#51511)
* Initial update

* Revert dependency output change

* Add changelogs
2024-09-19 10:43:05 +02:00
Vladimir Reznichenko b0799716aa
[dev] Monorepo: bypass git clone for WordPress core when spinning off wp-env (#51457) 2024-09-19 10:33:57 +02:00