Commit Graph

65316 Commits

Author SHA1 Message Date
jonathansadowski bd1bbfd63c
Update upload- and download-artifact versions in workflows (#51073)
* Update build zip workflow fo upload artifact v4

* Update download- and upload-artifact to v4 in code freeze workflow
2024-09-17 09:16:29 -05:00
louwie17 ad8a25bd63
Add cron for Storybook pages - daily at 2:30 UTC (#51445)
Add cron for storybook pages - daily at 2:30 UTC
2024-09-17 11:11:54 -03:00
Mike Jolley 554434ea3d
Cart Shortcode: `wc_get_cart_url` should only return current URL if on the cart page (#51384)
* Narrow logic further by only checking if the current page is the cart, not WOOCOMMERCE_CART

* changelog
2024-09-17 13:56:01 +01:00
Vladimir Reznichenko b98236a25e
[dev] CI: experimental version of performance metrics job (#51276) 2024-09-17 14:32:01 +02:00
Mike Jolley be17f843b6
Add missing `wp-block-` classnames to order confirmation blocks, Store Notices, and Breadcrumbs (#51380)
* Add missing wp-block-x classname to order confirmation blocks

* Use get_block_wrapper_attributes for store notices block

* Breadcrumbs and notices

* Changelog
2024-09-17 13:30:22 +02:00
Seghir Nadir 66523872f3
Support controlling address card state from data store in Checkout block (#51386)
* fix line height

* Support controlling address card from data store

* expand billing address on unsync

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

* disable linter rule

* remove empty section

* remove used vars

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-17 10:56:15 +00:00
Karol Manijak e354295387
Update Markdown lint allowing the same headings if they're not siblings (#51438)
* Set markdown rule about Multiple headings to check siblings only

* Change the doc to have same headings but not siblings as example

* Add changelog

* Update docs manifest
2024-09-17 12:44:15 +02:00
Vladimir Reznichenko 8b7050f9b1
Monorepo: git post-checkout hook to verify pnpm version and update dependecies. (#51382) 2024-09-17 12:34:40 +02:00
Ivan Stojadinov acc313a9b2
[e2e] External - Expand WPCOM suite, part 2 (#51414)
* Add /merchant tests to the WPCOM suite

* Skip "can manually add a variation" on WPCOM

* Skip "Coupon management" - API returns 500 on delete

* Resolve `wp-block-woocommerce-checkout-order-summary-block` on the first element

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-17 10:43:43 +02:00
Manish Menaria 861bc091d4
Product Collection - Add Editor UI for missing product reference (#51114)
* Initial implementation of the missing product state

- Changed `getProductCollectionUIStateInEditor` to a hook `useProductCollectionUIState`.
	- As we added logic to check if selected product reference is deleted which require making an API call. Therefore, I decided to use a hook.
- While making an API call to check if product reference is deleted, I decided to show spinner in the block.
- Introduced new UI state `DELETED_PRODUCT_REFERENCE` to handle the missing product state.
- Updated existing `ProductPicker` component to handle the new UI state.
	- It's better to use existing component for the missing product state, as it already has all the required UI.

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

* Use getEntityRecord to check if product exists and other improvements

* Remove console log

* Add E2E tests for deleted product reference in Product Collection block

This commit introduces new E2E tests to verify the behavior of the Product
Collection block when dealing with deleted product references. The changes
include:

1. New test suite in register-product-collection-tester.block_theme.spec.ts
2. Modification to product-collection.page.ts to support custom product selection
3. Minor update to utils.tsx to handle trashed products

These tests ensure that the Product Collection block correctly handles
scenarios where referenced products are deleted, trashed, or restored,
improving the overall reliability of the feature.

* Simplify product creation in Product Collection block test

* Refactor E2E test for delete product reference picker

1. Removing the unnecessary `test.describe` block for "Deleted product reference"
2. Eliminating the `beforeEach` hook that was creating a test product
3. Integrating the test product creation directly into the main test

This change simplifies the test structure and improves readability while
maintaining the same test coverage for the Product Collection block's
behavior when dealing with deleted or unavailable products.

* Simplify logic for product collection UI state

This commit simplifies the handling of the `usesReference` prop in the
Product Collection block:

1. In `edit/index.tsx`, directly pass `usesReference` to
   `useProductCollectionUIState` hook without conditional spreading.

2. In `utils.tsx`, update the type definition of `usesReference` in the
   `useProductCollectionUIState` hook to explicitly include `undefined`.

* Refactor Product Collection block to improve prop passing

- Introduce ProductCollectionContentProps type for better prop management
- Refactor Edit component to use a renderComponent function
- Update component prop types to use more specific props
- Remove unnecessary props from ProductCollectionEditComponentProps
- Simplify component rendering logic in Edit component
- Adjust ProductPicker to receive only required props
- Update imports and prop types in various files to use new types

This refactoring improves code organization and reduces prop drilling by
only passing necessary props to each component. It enhances maintainability
and readability of the Product Collection block and related components.

* Refactor Product Collection block editor UI state handling

This commit simplifies the rendering logic in the Product Collection block's
Edit component. It removes a redundant case for the VALID state, as both
VALID and VALID_WITH_PREVIEW states now render the same ProductCollectionContent
component. This change improves code maintainability and reduces duplication.

* Fix: isDeletedProductReference is not set correctly

* Use "page.reload" instead of "admin.page.reload"

* Separate PRODUCT_REFERENCE_PICKER and DELETED_PRODUCT_REFERENCE cases

This improves readability and maintainability of the switch statement.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-17 14:08:24 +05:30
Albert Juhé Lluveras 4ee2689f4f
Fix fatal when adding the Product Gallery (Beta) block into a pattern (#51189)
* Fix fatal when adding the Product Gallery (Beta) block into a pattern

* Add changelog file

* Linting
2024-09-17 09:49:53 +02:00
Moon 160b3e3ca7
Add use-wp-horizon feature flag (#51421)
* Add use-wp-horizon feature flag

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-16 21:02:21 -07:00
RJ 0036b4d293
add: tax task completion filter (#51362)
* add: tax task completion filter

* fix: add phpcs ignore for missing hook comment

* lint
2024-09-17 09:33:41 +08:00
Miguel Pérez Pellicer e4d995938f
Set customer email in reports data if available (#51367)
* Set customer email in reports data if available.

* Add changelog

* Lint
2024-09-16 22:45:47 +04:00
Boro Sitnikovski bf0646c307
Add error handling when the call to 'install-url' endpoint fails (#51298)
* Add error handling when the call to 'install-url' endpoint fails

* Changelog

* Ignore any explicitly

* Move the function below to address lint

* Change 'Try again' to a href, suggesting to download and install manually

* Lint
2024-09-16 16:57:05 +02:00
Tomek Wytrębowicz 450a299bae
Fix tax_code in the report export for removed rates (#51395) 2024-09-16 15:59:18 +02:00
Tomek Wytrębowicz a89bd1a485
Use page query param consistently as string for ReportsTable (#51396) 2024-09-16 15:57:58 +02:00
Seghir Nadir 1ef1aaa1f0
Hadren styles for interactive elements in Checkout block (#51375)
* reset styles for panel button

* reset styles for address card edit and address line 2

* Update shipping selector buttons

* fix line height

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

* remove extra styles no longer needed

* update styles to balance chevron and change to span

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-09-16 13:03:20 +00:00
Ivan Stojadinov cebdcc61d0
[e2e] External - Expand WPCOM suite, part 1 (#51303)
* Expand WPCOM suite

* Skip core-profiler.spec.js on WPCOM - no "Coming soon"

* Skip `Analytics-related tests` on WPCOM - different sums

* Skip `Marketing Overview page have relevant content` - no content on WPCOM

* Payment setup task - make Save button more unique

* Include more tests in playwright.config.js

* Skip `Store owner can skip the core profiler`

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

* Make "Get paid" more unique

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-16 13:56:44 +02:00
Seghir Nadir 77a17e48b7
update Mongolia postcode to be 5 digits instead of 6 in Checkout block (#50279)
* update Mongolia postcode to be 5 digits instead of 6

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

* update validation package and expand mongolia checks

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

* update lock

* fix lock again

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-16 11:22:38 +02:00
Adrian Moldovan 79b8a40157
Update nighty build workflow (#51328) 2024-09-16 12:11:15 +03:00
Vladimir Reznichenko d397e39c75
[dev] Update code owners files: initial ownership for Flux team (#51260) 2024-09-16 09:05:29 +02:00
Narendra Sishodiya 63d93d7355
Implemented PHPCS Fixes in OrdersTableQuery.php and ProductQuery.php (#51281)
* Implemented PHPCS Fixes in OrdersTableQuery.php and ProductQuery.php

* Reverted gmdate() to date()

* Add changelog

* Fixed linting issue in Update OrdersTableQuery.php

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-09-15 16:21:55 +01:00
Fernando Marichal ae20724210
Add inspector controls to Product Search block (#51247)
* Add inspector controls to product search

* Add changelog

* Move inspector panel to Styles

* Remove not used Fragment

* improve code

* Rename enum

* Rename type ProductSearchBlockProps

* Use PositionOptions constant

* Change hook namespace
2024-09-13 18:52:12 -03:00
jonathansadowski 0eb4383918
Update nvm instructions in README.md (#51240)
* Update nvm instructions in README.md

* Update getting started instructions for nvm install

* Update docs manifest
2024-09-13 14:20:19 -05:00
Barry Hughes 9b41815229
Produce CSV Import enhancements (cherry-pick PR#51344) (#51348)
* Move AJAX callback to produt importer controller

* Add better validation for file paths in CSV product import

* Add utility function to create a no-index directory

* Add CSV upload helper

* Simplify product CSV import logic using helper

* Update tests

* Add changelog

* Changelog.

* Remove changelog file; entry added directly to root changelog.txt.

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-09-13 11:39:37 -07:00
Tung Du 93053f39ed
[Experimental] Product Filters: New and improved blocks structure (#51096) 2024-09-14 00:04:06 +07:00
Cem Ünalan 3854f710df
In-App: make in-app header sticky (#51187)
* In-App: make in-app header sticky

z-index: 1 is required to make sure the header appears above product
cards.

Also had to remove a parent `overflow: hidden` property. Apparently,
it's there to remove a second scrollbar. Upon removal, I didn't see
any double scrollbars, although it can be platform differences. Will
check it out in the PR review.

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

* Update Change Your Store width for Marketplace search listing

Setting it 450px hardcoded causes overflows and breaks the layout.

See:
https://github.com/woocommerce/woocommerce/pull/51187#issuecomment-2344003169

* Move CYS tweak to the component

It was placed in the marketplace SCSS code previously. GitHub:
https://github.com/woocommerce/woocommerce/pull/51187#discussion_r1758381473

* Remove marketplace-specific styles from customize store banner

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
2024-09-13 15:55:47 +00:00
Miguel Pérez Pellicer 737afc62e1
Validate and prepare GTIN in structured data (#50926)
* Validate and prepare GTIN in structured data

* Add changelog

* PHPCS

* PHPCS

* Verify gtin is string in prepare gtin

* Tweak tests

* PHPCS

* Tweak is_valid_gtin

* LINT

* Update plugins/woocommerce/includes/class-wc-structured-data.php

Co-authored-by: Mik <mikkamp@users.noreply.github.com>

* Update plugins/woocommerce/includes/class-wc-structured-data.php

Co-authored-by: Mik <mikkamp@users.noreply.github.com>

* Update plugins/woocommerce/includes/class-wc-structured-data.php

Co-authored-by: Mik <mikkamp@users.noreply.github.com>

---------

Co-authored-by: Mik <mikkamp@users.noreply.github.com>
2024-09-13 19:11:11 +04:00
Fernando Marichal ce618d6250
[Enhancement] Abstract rating block (#50810)
* Create rating component

* Refactor rating block

* Fix ProductRating component

* Refactor rating blocks

* Add changelog

* Review count maybe visible for rating stars

* Rename props

* Remove 0 after No reviews message

* Remove review count from rating-stars
2024-09-13 09:35:56 -03:00
Seghir Nadir 348455fb02
Add focus styles for select in Checkout block (#51332)
* Add focus styles for select

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-13 11:13:40 +01:00
Seghir Nadir 1b28b0f1ca
Use site language when making Store API requests in Cart/Checkout (#51244)
* Use correct langauge by reseting the locale param

* use typescript
2024-09-13 11:42:21 +02:00
Karol Manijak 29ed02836a
Disable client-side nav in PC block when filters are inside (#51358)
* Disable client-side nav in PC block when filters are inside

* Add changelog

* Fix lint
2024-09-13 09:58:17 +02:00
Corey McKrill 9d76114472
Update Action Scheduler to 3.8.2 (#51353)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-09-13 09:37:13 +02:00
Vladimir Reznichenko 55f855a2e6
[dev] Monorepo: introduce reporting mode for perf utility. (#51366)
Monorepo: introduce reporting mode for perf utility.
2024-09-13 08:58:44 +02:00
Basti 4dad4a9265
Fix: Version in mini-cart.php (#51020)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-09-13 08:51:31 +02:00
Vishnu Gopal 411d9ae78c
Add subscribe notices for products without subscription (#51060)
- Add a new notice to the plugins list for products used without subscriptions reminding them to purchase.
- Remove notices for expired and expiring subscriptions from WooCommerce settings screens.
- Change link for subscribe and renew to add the product directly to cart.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-13 10:33:54 +05:30
RJ d7ccebc004
fix: add check for wp_get_current_user() before calling it (#51302)
* fix: add check for wp_get_current_user() before calling it

* changelog

* changed try catch to catch throwable
2024-09-13 12:44:28 +08:00
Sam Seay 268fc4cf4d
Fix a bug where the guest order confirmation email input was too wide (#51277)
* Add styles to style the input width appropriately.

* Remove redundant styles.

* Remove unused import

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-13 13:22:55 +12:00
Chi-Hsuan Huang 2cbb9d59bc
Deprecate unsupported Inbox note banner layout (#51275)
* Deprecate note banner layout

* Update doc

* Add changelog
2024-09-13 01:11:11 +00:00
Chi-Hsuan Huang f89366033d
Dynamically set plugin_name when redirecting to Jetpack Auth from core profiler (#51278)
* Dynamically set plugin_name when redirecting to Jetpack Auth from core profiler

* Add changelog

* Update param name
2024-09-13 08:34:17 +08:00
Chi-Hsuan Huang 45fc403f6f
Remove deprecated RemoteInboxNotification classes (#51250)
* Remove deprecated RemoteInboxNotification classes

* Derecate RIN interfaces

* Move RIN tests to remote specs folder

* Add changelog

* Update changelog

* Fix lint

* Fix lint

* Fix tests
2024-09-13 08:31:59 +08:00
github-actions[bot] cc781792fd
Update changelog.txt from release 9.3.1 (#51347)
Prep trunk post release 9.3.1

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-12 22:31:01 +00:00
RJ 109744db33
fix: remove help panel user meta (#51249) 2024-09-13 05:46:27 +08:00
Cem Ünalan 3300aef6c7
In-App Marketplace: Record the legacy Tracks event for Discover page (#51163)
* In-App Marketplace: Record the legacy Tracks event for Discover page

Fixes #21486

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-12 21:13:13 +00:00
Cem Ünalan 0e930533e9
Prevent search request in the Extensions > My Subscriptions page (#51164)
* Prevent search request in the Extensions > My Subscriptions page

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-12 20:36:58 +00:00
Maikel Perez f39e1d72c0
CYS: Fix Looker dashboard data (#51206)
* Track data for font and color pairings including 'Create your own' option in CYS

* Add changelog file

* Track data for logo flow

* Send the open param as part of the tracking event customize_your_store_assembler_hub_color_palette_create_toggle
2024-09-12 12:47:23 -03:00
Ivan Stojadinov a06c6ba496
[e2e] External sites - Include API tests for Pressable and WPCOM (#51284)
* Pressable - run only /api-tests

* Skip on Pressable

* Fix lint errors

* WPCOM - run API only

* Revert "WPCOM - run API only"

This reverts commit 5e59be1663.

* WPCOM - run API only

* Update settings-crud.test.js so they are passing against Pressable

* Skip "can retrieve all tax settings"

* Skip "can view all system status items" on WPCOM

* Several skips in settings-crud.test.js

* Skip "Product review tests: CRUD" on WPCOM

* Skip "List all products > categories" on WPCOM

* Skip "can view all payment gateways" on WPCOM

* Skip "Orders API tests" on WPCOM

* Skip "Customers API tests: CRUD" on WPCOM

* Revert `playwright.config.js` files and include '**/api-tests/**/*.test.js',

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

* Skip three more API tests for WPCOM

* Skip two coupons tests

* Update report name for Pressable and WPCOM to ``*-core-e2e-and-api`

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-12 16:01:40 +02:00
Naman Malhotra 2433f9f1c4
Update changelog.txt - trunk (#51324) 2024-09-12 14:55:47 +01:00
Brent MacKinnon 5e4a6fc5e6
Update totals-footer-item.md (#51261)
* Update totals-footer-item.md

replacing `<` & `>` with `&lt;` & `&gt;` for the purposes of displaying html within code snippets on woocommerce docs site.

* update < > with &lt; &gt;

* more small fixes

* update manifiest

* update erroneous tag swap

---------

Co-authored-by: piinthecloud <stephanie.pi@automattic.com>
Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-09-12 13:51:32 +00:00