Commit Graph

19587 Commits

Author SHA1 Message Date
nigeljamesstevenson 0064abbd0f
Update stable tag to 8.5.2 (#44096)
woorelease: Update stable tag to 8.5.2
2024-01-25 19:44:13 +00:00
Corey McKrill 421ec8e31a
Settings: Ensure row attributes don't have HTML entities (#44094)
In #43166 I changed the way that row classes are added on settings
fields. However, by using `esc_html`, it's actually outputting invalid
HTML, where the double quote wrappers are getting converted to HTML
entities. This simply switches back to escaping only the attribute value
and not worrying if the tr element contains an empty class attribute.
2024-01-25 18:54:39 +00:00
github-actions[bot] 603a4fc689
Delete changelog files based on PR 44037 (#44083)
Delete changelog files for 44037

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-25 16:11:00 +00:00
github-actions[bot] 1a38522518
Delete changelog files based on PR 43354 (#44089)
Delete changelog files for 43354

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-25 16:10:35 +00:00
Albert Juhé Lluveras 66c3467b69
Avoid duplicate templates appearing on the Site Editor when the WooCommerce template and the theme template have been customized by the user (#44000)
* Avoid duplicate templates appearing on the Site Editor when the WooCommerce template and the theme template have been customized by the user

* Add tests

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

* Clean up templates after running all tests to increase speed

* Fix comment linting

* Fix addToCart() util with the classic template

* Remove unnecessary condition

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-25 14:55:17 +01:00
Mike Jolley dc6af08596
Initialise customer sessions on the order pay page (#43858)
* Create session on the order pay page

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

* changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-25 13:12:10 +00:00
Alba Rincón f46ffe1450
[CYS] Proceed with product creation when their images fail to upload (#44031)
* Return error when the product creation fails

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

* Continue with product creation even when the image upload fails

* Revert

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

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

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

* Add a warning message with the error when creating the products with no images

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-25 12:49:45 +01:00
Luigi Teschio 0a1c4a6920
[CYS - Core] Handling errors during the setup for the `NoAI` flow (#43810)
* CYS - Core: handling errors during the setup

* fix CSS format

* remove export

* fix CSS

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

* fix import

* fix style notice

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-25 12:04:44 +01:00
Mike Jolley 538e45ccb4
Fix SVG markup in miniCartIcon (#44042)
* Update MiniCart.php

* Add changelog entry

---------

Co-authored-by: niharikamahajan02 <72392580+niharikamahajan02@users.noreply.github.com>
2024-01-25 11:03:51 +00:00
Ilyas Foo 2c283d7134
Add rudimentary try catch for all remote endpoint spec evaluators (#44037)
* Add rudimentary try catch for all remote endpoint spec evaluators

* Changelog

* Lint

* More lint
2024-01-25 18:58:15 +08:00
Tung Du 1abefd5eee
[Experimental] Filter block: replace custom upgrade panel by Transforms API (#44024) 2024-01-25 15:28:09 +07:00
Tung Du b50431d9af
[Experimental] Filter block: refactor visibility control, context passing, and filter data processing (#43996) 2024-01-25 13:55:45 +07:00
Vedanshu Jain efd5ccebeb
Add filters for customer email and order id for performance. (#43865)
* Add filters for customer email and order id for performance.

* Empty where should not cause invalid query.

* Add changelog.

* Add unit test for newly supported search params.

* Apply coding standards.

* Add a trailing wildcard to allow broader search.

* Remove extra line.

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-01-24 16:08:07 -08:00
Cem Ünalan 48ebe7b84c
Marketplace: Add "Add to Store" button for free and WordPress.org products #43616 (#43983)
* Marketplace: Add "Add to Store" button for free and WordPress.org products (#43616)

* Marketplace: Install free .org plugins with Add to Store button

* Marketplace: addressed feedback for the the new install free products flow

- Moved notices to the top of the modal
- Updated notice styles slightly
- Updated the CreateOrderSuccessResponse to reflect API changes

* Marketplace: Require the Helper orders API file

* Marketplace: fix linter errors

* Marketplace: form encode when submitting the request

The body is encoded anyways by the WordPress core. However, if I don't
do it here, I can't create a valid signature to be verified by
Woo.com.

I could have just submitted a JSON too, but this seamed easier since
the body is parsed on Woo.com automatically when it's in this form.

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

* Marketplace: remove "~" character in imports and use relative paths

* Marketplace: fix margins in the product with the Add to Store button

* Marketplace: Add conditions to hide the button

We hide it if:

- the product is already installed
- user doesn't have the right capability
- if the product is just installed using our flow and there is
no page refresh

* Marketplace: don't show Add to Store button on Themes and on Discover

* Marketplace: fix linting

* Marketplace: hide ratings from the product if "is-small" class exists

* Marketplace: fix linting errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-24 23:02:20 +03:00
Jonathan Lane 27f079e9b1
Adds tests for core profiler (#44022)
* Adds tests for core profiler

* Add additional assertions

* Add changelog

* Standardize spacing

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-24 12:00:52 -08:00
Tomek Wytrębowicz 1976e40136
Remove wp-data & wc-blocks-checkout dependencies from OA script (#43857)
Resolve conditional dependency in JS.

Fixes #43829

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-01-24 18:58:57 +01:00
Tarun Vijwani 0c79d1b6a7
Display shipping calculator link in the Cart block when fallback shipping options available (#43803)
* Hide the shipping rates in editor to match front-end

- If there are no shipping rates, hide the shipping rates in editor to match front-end.

* Add get_shipping_zones method to CartCheckoutUtils

* Display change address like for fallback shipping zone

- If cart has multiple and default shipping zones without shopper address, display the change address link

* Update shipping address label

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

* Fix linting errors

* Update plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/shipping/shipping-address.tsx

Co-authored-by: Niels Lange <info@nielslange.de>

* Display shipping calculator for locations outside all other zones

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

* Update typescript for activeShippingZones

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2024-01-24 20:40:53 +04:00
louwie17 11aa8b6c46
Update product editor experiment name for new release (#44014)
* Update experiment name and enable linked products

* Add changelog
2024-01-24 11:41:05 -04:00
Thomas Roberts 0ecb53f61c
[Experimental] Update args for `woocommerce_blocks_validate_additional_field_{key}` filter (#44012) 2024-01-24 07:06:16 -08:00
Albert Juhé Lluveras 081f9d303b
Move Cart, Checkout and Order Confirmation template customization tests to the parameterized tests file (#43992)
* Move Cart, Checkout and Order Confirmation template customization tests to the parameterized tests file

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

* Clean up order-confirmation.block_theme.spec.ts file

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-24 15:26:07 +01:00
Adrian Moldovan 0aebb139c2
Update eslint parser to @babel/eslint-parser (#43859) 2024-01-24 13:06:51 +02:00
Vlad Bozdog a6210ba312
43813 hpos add missing filters on order listtable (#43815)
* add filter on build_count_query

* 43813-hpos-add-missing-filters-on-order-listtable

* 43813-hpos-add-missing-filters-on-order-listtable

* 43813-hpos-add-missing-filters-on-order-listtable

* 43813-hpos-add-missing-filters-on-order-listtable

* 43813-hpos-add-missing-filters-on-order-listtable

* 43813-hpos-add-missing-filters-on-order-listtable

* 43813-hpos-add-missing-filters-on-order-listtable

* Update plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>

* Update plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>

* 43813-hpos-add-missing-filters-on-order-listtable

* 43813-hpos-add-missing-filters-on-order-listtable

---------

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-01-24 09:17:25 +01:00
Chi-Hsuan Huang aa028da0b7
Send store address data to the obw subscribe endpoint (#43848)
* Sync country name to Klaviyo and Mailchimp

* Add state name

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-24 09:43:46 +08:00
Ilyas Foo f85d275c3a
Fixes `strpos` in `ComparisonOperation` for PHP 8 (#44007)
* Fixes

* Changelog

* Add breaks
2024-01-24 08:42:41 +08:00
jonathansadowski 9b98a85380
Remove docs plugin from monorepo (#44013)
* Remove docs plugin from monorepo

* Add language to md-docs readme

* Fix lint error in blocks

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-23 16:16:07 -06:00
Adrian Moldovan d66a48e8e5
[e2e tests] Add tests for product images (#43775)
* Import media on environment setup

* Add product-images.spec with one complete test and all other skeleton tests

* Add changelog

* Implement can update the product image

* Implement can delete the product image

* Implement can delete the product image

* Skip not implemented test

* Merge fixtures

* Add productWithImage fixture

* Remove unused variable `api`

* Partial implementation of can create a product gallery

* Check the image gallery in store frontend

* Added `can update a product gallery` test

* Run all tests

* Search for image in media library

* Check that the remove gallery image is not displayed

* Add repeatEach configuration

* eslint formatting

* Extract some repeating steps into a function

* Update check for thumbnail

* Fix test image name
2024-01-23 13:31:22 -08:00
Maikel Perez 9f3c7885a4
Remember downloadable files (#44008)
* The previously uploaded file should re-appear when the product changes from downloadable to not and then back again

* Add changelog file

* Fix php linter error
2024-01-23 14:53:22 -03:00
louwie17 1a4ebebf6a
Fix description toolbar with latest GB version (#43835)
* Initial changes to fix the toolbar in the iframe editor

* Moved toolbar to header and respect fixedToolbar preference

* Only render Gutenberg toolbar with specific version

* Update GB version

* Fix build issue

* Add fixed toolbar menu

* Remove unused import

* Add changelogs

* Fix lint errors

* Fix PHP lint error
2024-01-23 11:17:37 -04:00
Maikel Perez 26a546954a
Hide Downloads section under Toggle (#43864)
* Add Include downloads to show/hide the Downloads section

* Fix margin top for none first child nested sections

* Add changelog files

* Fix php linter errors
2024-01-23 12:12:52 -03:00
Maikel Perez dbae7d6661
Create product-pre-publish-modal feature flag (#43861)
* Create product-pre-publish-modal feature flag

* Add changelog file

* Fix auto formatting change
2024-01-23 11:46:52 -03:00
Maikel Perez 7ec8f7932e
Variations tab should be moved to the second tab, after General (#43998)
* Move variations tab to position 2 so it will appear right next to the general tab

* Add changelog file
2024-01-23 11:45:59 -03:00
Niels Lange 30dfa013f9
Unskip e2e tests (#43852)
* Remove obsolete comment

* Unskip cart and checkout translation tests

* Unskip shipping method switching tests

* Unskip template-related e2e tests

* Unskip order confirmation test for guest users

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

* Adjust broken e2e tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-23 21:32:10 +07:00
Alba Rincón a44a45b56a
CYS Redirect to intro screen if theme is not modified (#43736)
* Redirect to intro screen if theme is not modified

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

* Add and fix test for the redirection

* Redirect with the proper url 'intro'

* Remove only

* Avoid completing the cys task when switching themes

* Revert prev commit and reset `woocommerce_admin_customize_store_completed` before each test

* Set the `woocommerce_admin_customize_store_completed` to `no` before each test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-23 11:15:19 +01:00
Alfredo Sumaran 4fd42aa7c5
Apply Rector suggestions for PHP 8.1 (#43236)
* PHP 8 Updates for src/Internal

* Add changelog entry

* Fix PHP lint issues

* Add unit test for not in queries.

---------

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-01-23 15:32:46 +05:30
Ilyas Foo 8a1af8a432
Add "I'm selling online and offline" for Square credit card payment recommendation (#43816)
* Add online offline for Square credit card

* Lint

* Changelog

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

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

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-01-23 13:52:27 +08:00
Sam Seay 42e77d4938
[Experimental] Product Filter - Reintroduce Wrapper Block (#43688) 2024-01-23 18:29:24 +13:00
Chi-Hsuan Huang 9b7d9ce689
Update the onboarding profile API validation for `business_extensions` parameter (#43806)
* Update the validation for business_extensions parameter

* Add changelog
2024-01-23 10:53:16 +08:00
Justin Palmer 8baa07e029
Remove `UTM` from Order Attribution metabox labels (#43041)
* Rename order attribution template file
* Update OA field name to `source_type` to keep up with https://github.com/woocommerce/woocommerce/pull/41690
* Discard conditional UTM labels altogether

---------

Co-authored-by: Tomek Wytrębowicz <tomalecpub@gmail.com>
2024-01-23 01:40:05 +01:00
Damián Suárez 0940201c37
Add suggested-products product endpoint (#43720)
* init approach of related products endpoint

* register related prodducts endpoint

* rename response prop with ids

* filter categoris from endpoint params

* filter categories when pulling related products

* changelog

* extend from WC_REST_CRUD_Controller class

* iterate over defininf endpoint params

* doc

* merge product terms with params

* introduce `combine` param

* return products collection instead of plain array

* fixinf eslint issues

* pass proper fn args to bound fns

* do not call parent register method

* post type is defined by parent controller class

* remove related products controller

* extend products controller with `related-products`endpoint

* filter post__in param

* when no related products found return empty array

* change and register endpoint params

* remove commented line

* add a custom method to extend the params

* update

* fix typo

* ensure to respect the products limit

* fix eslint issue

* remove unrequired endpoint id param
2024-01-22 17:18:02 -03:00
Christopher Allford db8da8d712
Properly Configured Wireit Production Builds (#43716) 2024-01-22 10:13:45 -08:00
Tarun Vijwani 139150134f
Add store notices to the Cart and Checkout block templates (#43753)
* Fix session notices in Cart and Checkout block pages

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

* Update plugins/woocommerce-blocks/assets/js/base/components/notice-banner/style.scss

Co-authored-by: Niels Lange <info@nielslange.de>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2024-01-22 21:25:42 +04:00
Néstor Soriano 7c62443ebe
Improve the logging/noticing of Legacy REST API usages (#43851)
* Include request IP address in the logging of Legacy REST API usages

* Add link to the Legacy REST API plugin to the usage notices
2024-01-22 17:02:19 +01:00
Alfredo Sumaran e48849444c
Apply Rector suggestions for PHP 8.1 (#43235)
* PHP 8 updates for src/Database/*

* Add changelog entry

* Update changelog entry
2024-01-22 15:30:31 +00:00
Barry Hughes f6fbb42652
Optimize performance of `WC_Install::is_new_install()`. (#43767) 2024-01-22 16:08:05 +01:00
Mike Jolley 18cd0a9690
[Experimental] Surface custom fields in Emails (#43519)
* Get default attributes on front end

* Remove console log

* Show notice about 0 registered fields in editor

* Do not show block in editor if no fields are registered

* Wrapper block

* Update webpack config

* Wrapper block type definition

* Separate fields from the hook block

* Hide when no custom fields exist

* Address and contact fields

* Shared form fields in settings

* Revert render_content to original

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

* Get default attributes on front end

* Add initial sections to email templates

* Revert "Get default attributes on front end"

This reverts commit f76c21617a2c5ad832d4579ba2c4c8e98afd440d.

* Also render contact fields

* Handle plain text

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

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

* Unwanted changes from rebase

* Use get_order_additional_fields_with_values

* Remove sample fields

* Version bump for styles

* Update plugins/woocommerce/includes/class-wc-emails.php

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update plugins/woocommerce/includes/class-wc-emails.php

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Apply view context

* Handle null

* Context

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-01-22 13:56:22 +00:00
Thomas Roberts 4114c5a5f1
[Experimental][Refactor] Reduce complexity of custom field registration function (#43663)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-22 05:48:23 -08:00
Albert Juhé Lluveras c1b131c869
Add e2e tests to verify specific theme templates have priority over user-modified Product Catalog template (#43750)
* Add e2e tests to verify specific theme templates have priority over user-modified Product Catalog template

* Add changefile(s) from automation for the following project(s): woocommerce-blocks
2024-01-22 14:44:07 +01:00
Albert Juhé Lluveras 550bfe3572
Update WC Blocks Playwright tests docs so we pass parameters correctly to PNPM scripts (#43779) 2024-01-22 11:20:59 +01:00
Alba Rincón 95ed989ab4
Fix handling the error from the `product_image_upload` and `update_product_content` functions (#43793)
* Fix handling the error from the `product_image_upload` function

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

* Fix linting errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-22 09:59:51 +01:00
Thomas Roberts 7dabf2b031
[Experimental] Add `$request` to additional fields validation filter (#43789)
* Add $request to additional fields filter

* Add changelog entry

* Add data to additional message
2024-01-19 23:21:47 -08:00