Commit Graph

65168 Commits

Author SHA1 Message Date
Chi-Hsuan Huang 73f45833b1
Enhance Remote Logging to Include `request_uri` (#50671)
Add request_uri prop to remote logging data
2024-08-15 22:14:53 +08:00
Nathan Silveira 1235f4d38a
Fix typo in wc_get_product_id_by_global_unique_id (#50702) 2024-08-15 10:14:33 -03:00
Chi-Hsuan Huang c07b7b8e9f
Update LYS frontend e2e tests to test with both classic and block themes (#50657)
* Update lys e2e tests to test with both classic and block themes

* Add changelog

* Minor tweak
2024-08-15 12:57:12 +00:00
Adrian Moldovan 8c9c784f45
Tweak stalebot settings for flaky tests issues (#50630) 2024-08-15 13:54:44 +01:00
Adrian Moldovan d7909ecb3c
[e2e tests] Add BuildKite reporter to Blocks e2e tests (#50642) 2024-08-15 13:48:44 +01:00
Nathan Silveira 70fc2d595e
Remove global_unique_id from interface and add warning in case it is not implemented (#50685) 2024-08-15 09:29:25 -03:00
Chi-Hsuan Huang bcf1a38a58
Prevent initializing coming soon feature if it's already initialized (#50668)
* Prevent initializing coming soon feature if store pages only

* Add changelog

* Improve check
2024-08-15 10:25:44 +00:00
Akeda Bagus 1806747254
Show expiring and expired notices to active and unconnected subscriptions (#50383) 2024-08-15 15:00:16 +07:00
github-actions[bot] de05966754
Delete changelog files based on PR 50679 (#50690)
Delete changelog files for 50679

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-14 17:41:28 +01:00
Moon c12b9da403
Blueprint - Disregard invalid slug and continue (#50607)
* Disregard invalid slug

* Change logic for invalid slug -- plugin dir with the slug must exist

* Use put_contents correctly

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-08-14 09:19:43 -07:00
Alba Rincón 4252682583
Fix `Product meta` console error (#50680)
* Fix `Product meta` console error

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

* Not use Atomic class

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 16:53:20 +02:00
Luigi Teschio 67bc34e607
CYS: avoid to enqueue Jetpack scripts (#50679)
* CYS: avoid to enqueue jetpack scripts

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

* remove not necessary import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 14:49:47 +00:00
Mike Jolley 1d9592db87
Cart Shortcode: Fix cart rendering after AJAX updates by modifying cart page URL (#50524)
* Remove redirects in form handler if no referrer is passed

* Use current URL for cart URL if on the cart page

* Changelog

* Indents
2024-08-14 15:31:37 +01:00
Mike Jolley a932ceb59f
Fix extensionCartUpdates not surfacing errors to cart and checkout (#49762)
* Add context to type

* Clean up notifyerrors helpers

* Notify and clear top level cart errors

* changelog

* Make extensionCartUpdate surface the errors

* No automatic clearing of notice

* Handle generic errors only, add docs

* Rename param

* Fix linting in readme

* Update toc

* test coverage

* Unused import

* We're only dealing with arrays of errors so simplify logic
2024-08-14 15:24:44 +01:00
Gabriel Manussakis f3a1281cd0
[Accessibility] Improve hover style on product tabs (#50605)
* Make hover status style like active

* Add changelog file

* Update changelog message

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>

---------

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2024-08-14 15:56:19 +02:00
Albert Juhé Lluveras 474eae1135
Make templates fallback methods template-agnostic (#46372)
* Make some methods agnostic of which fallback template is used

* Get rid of the template_is_eligible_for_fallback() util

* Get rid of the template_is_eligible_for_fallback() util (II)

* Add changelog

* Get rid of the template_is_eligible_for_fallback() util (III)

* Add back 'template_is_eligible_for_fallback' method

* Fix issue after rebase

* Remove some more instances of hard-coded templates from the template hierarchy code

* Update comments

* Remove unused template_is_eligible_for_fallback() function

* Add extra explanatory comment
2024-08-14 15:30:37 +02:00
Albert Juhé Lluveras 9f69c63a9e
Product Price block: prevent price amounts from breaking into multiple lines (#50660)
* Product Price block: prevent price amounts from breaking into multiple lines

* Add changelog file
2024-08-14 15:17:03 +02:00
Alba Rincón 3491c6b7dc
Fix `store-title` endpoint - Pass default value to `get_option` (#50673)
* Pass default value to get_option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 14:37:30 +02:00
Chi-Hsuan Huang 88e4a6f0e9
Tweak lost password e2e logic (#50666) 2024-08-14 19:31:18 +08:00
Alba Rincón a512668e96
Fix `AddToCartForm` translation on the `Single Product` block (#50628)
* Avoid registering block in the wrong context

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

* Fix Product meta translations

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

* Fix lint error

* Remove AddToCartForm from the list of blocks to not register in posts

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 12:10:16 +02:00
Alex Florisca 006fbc6714
Add new buttonAttributes API to style express checkout buttons coherently (#47899)
* Expose buttonAttributes to the express payment methods

* Add size and label attributes to the express checkout area

* Remove defaultHeight

* default button Label

* Remove the button label attribute

* Remove px from height

* Change large button height to 55px

* Load express checkout block with attributes

* Add toggle and borderRadius controls and remove getting border radius from the theme

* Remove extra border radius text

* Only pass buttonAttributes if toggled on

* Move express payment block attribute logic into a Provider

* Tidy up editor grid and parse attributes into context on frontend

* Add px to border-radius input

* Express payment methods not selectable

* Add a test

* lint fixes

* default button height is 48 not 4

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

* Update docs

* Add tests for express payment methods

* Center images within the express payment area in the editor

* Apply the buttonAttributes to the li container in the editor regardless of showButtonStyles

* Fix style issue

* fix linting

* fix lint again

* Update manifest

* Update docs manifest

* Resize images in editor

* lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 11:02:58 +01:00
Alba Rincón 9995b51a5a
Fix `Product Meta` translations (#50625)
* Avoid registering block in the wrong context

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

* Fix Product meta translations

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

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 11:29:03 +02:00
Karol Manijak f1be869ff4
Fix the PHP warning in which the null was passed to json_decode (#50661)
* Fix the PHP warning in which the null was passed to json_decode

* Add changelog
2024-08-14 11:13:37 +02:00
Alba Rincón 381c87da80
Fix translations - Avoid registering blocks in the wrong context (#50615)
* Avoid registering block in the wrong context

* 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-08-14 10:43:32 +02:00
Alba Rincón d04666e35c
Fix `Single product` translations on edit mode (#50599)
* Format json

* Get title and description from the registered block

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

* Add empty array dep

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 10:43:15 +02:00
Chi-Hsuan Huang 5c980cc629
Optimize large image files (#50517)
* Optimize large image files

* Add changelog

* Update logo-tiktok.png

* Update tiktok logo - 128x128 px
2024-08-14 12:29:03 +08:00
Chi-Hsuan Huang 6290e8e0f7
Add lost password e2e tests (#50611)
* Add lost password e2e tests

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

* Update lost password e2e test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 04:28:16 +00:00
Chi-Hsuan Huang 175ebe2a5e
Update the LYS "Add payment methods" link to the payment settings page (#50609)
* Fix the "Add payment methods" link in LYS congrat screen redirects to a blank page

* Add changelog

* Fix link
2024-08-14 09:39:03 +08:00
Chi-Hsuan Huang 9fcd59d3d0
Update WooCommercePayments task `is_supported` method to use default suggestions (#50585)
* Update WooCommercePayments task is_supported to use default suggestions

* Add changelog
2024-08-14 09:38:50 +08:00
Chi-Hsuan Huang bb7dbf9e3c
Add `woocommerce_coming_soon` option for all sites (#50581)
* Add woocommerce_coming_soon option for all sites

* Set default option

* Add changelog

* Update `woocommerce_coming_soon` option to use `update_option` instead of `add_option`
2024-08-14 09:37:31 +08:00
Paul Sealock 75c18a6902
[Beta Tester] Add WCPay test order meta data (#50467) 2024-08-14 10:08:59 +12:00
github-actions[bot] ff4c3c37b1
Delete changelog files based on PR 50592 (#50603)
Delete changelog files for 50592

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-13 20:22:58 +01:00
github-actions[bot] ac7e295820
Delete changelog files based on PR 50608 (#50648)
Delete changelog files for 50608

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-13 20:08:59 +01:00
Marianne380 883f557dc4
[Fix] Clear product unique ID (`global_unique_id`) when duplicating products. (#50629)
* Generates unique product unique ID (`global_unique_id`) when duplicating products.

* Just clear the global unique id.

* Add changelog
2024-08-13 15:04:27 -03:00
github-actions[bot] 10c66ad031
Delete changelog files based on PR 50496 (#50646)
Delete changelog files for 50496

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-13 18:29:12 +01:00
Vedanshu Jain f0b637f9c4
Cache order year_months in options for performance. (#50066)
* Cache order year_months in options for performance.

* Modify to prevent unnecessary option changed.

Add unit tests.

* Add the strict type directive.

* Use exact check to use more cache instances.

* Add clean state test.

* Add namespace.

* Namespace fixes.
2024-08-13 21:32:30 +05:30
Fernando Marichal 5922b42577
Only count published products in productCount (#50503)
* Only count published products in productCount

* Add changelog

* Fix lint

* Fix lint
2024-08-13 12:28:55 -03:00
Adrian Moldovan 7a20d626d3
[e2e tests] Transform Classic Checkout: add an extra check of API response before checking the UI (#50627) 2024-08-13 17:53:07 +03:00
Bart Kalisz daa6a95b56
Metrics: Use utils provided by `@wordpress/e2e-test-utils-playwright` (#50626) 2024-08-13 15:26:47 +02:00
Adrian Moldovan f91bcf44c7
[e2e tests] Add an option to skip the env setup script when running tests (#50620)
Add the -x option to skip executing the env setup script
2024-08-13 16:03:10 +03:00
DAnn2012 3a363d232b
Fix typo (product-collection.block_theme.spec.ts) (#50154)
Co-authored-by: github-actions <github-actions@github.com>
2024-08-13 12:38:56 +01:00
Heitor Pedroso b2f5f98593
Update additional-checkout-fields.md (#50377)
* Update additional-checkout-fields.md

* Update docs-manifest.json

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-08-13 12:03:21 +01:00
Adrian Moldovan eaa13c0151
[e2e tests] Replace hardcoded default wp-env credentials (#50617) 2024-08-13 13:54:37 +03:00
Thomas Roberts 8707e71eb3
Add additional unit tests for Store API checkout flow (#50033)
* Add virtual product to fixtures

* Add test to check virtual products can be ordered

* Add test to check orders cannot be placed with invalid payment method

* Add test to ensure orders can't be placed with out of stock items

* Add test to ensure orders can't be placed with unowned coupons

* Add test to ensure orders can't be placed coupons exceeding usage limit

* Add test to ensure that orders can be placed with coupons.

* Add changelog

* Clean up coupon management

* use correct WC case

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-13 10:45:06 +00:00
Karol Manijak 8bdc78c777
Product Collection: Trigger `wc-blocks_product_list_rendered` JS event (#50166)
* Dispatch JS event about PC being rendered

* Revert format changes

* Write the callback

* Add functions descriptions

* Add changelog

* Remove empty line

* Add tests

* Rename test cases

* Replace waiting for page load with more reliable expect.poll

* Remove leftover step

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Fix typo in function name

* Add collection name to default Product Collection block

* Expect collection name in the event

* Expose the collection name through IAPI context

* Send the collection name with the event

* Trigger event also on page change

* Remove unused CUSTOM collection type

* Provide documentation

* Update TOC

* Update tests that verify the event payload

* Improve E2E tests further

* Don't add a Product Catalog collection type to default collection

* Avoid repeating the same piece of code by extracting some function on tag processor

* Rename function to better depict its purpose

* Move the documentation to the right place

* Remove the unused variable

* Add example to dom-events doc

* Update documentation

* Update docs manifest

* Attach default collection name

* Add the default collection context in PHP so it covers all the cases

* Prevent exposing product catalog collection name in event

* Update docs

* Update test

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-08-13 12:29:04 +02:00
Adrian Moldovan 7802209887
[e2e tests] Update locators for Customers page in page-loads spec (#50559) 2024-08-13 12:04:41 +02:00
Bart Kalisz 03049e0d17
Fix Metrics job (#50482) 2024-08-13 11:31:39 +02:00
Bart Kalisz 418c8f029f
Product Collection: Remove automatic migration code (#50440)
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-13 11:29:07 +02:00
Adrian Moldovan e82f1ea98f
[e2e tests] Add hpos disabled environment and tag tests (#50448) 2024-08-13 11:28:21 +02:00
Chi-Hsuan Huang 49e11aa25b
Update add product task bottom section UI (#50580)
* Update add product task bottom section UI

* Add changelog
2024-08-13 13:02:50 +08:00