Commit Graph

21939 Commits

Author SHA1 Message Date
Vlad Olaru b03a347883
test: Fix unit tests 2024-09-19 20:20:46 +03:00
Vlad Olaru 9a876647f1
Lint fixes 2024-09-19 20:00:00 +03:00
Vlad Olaru ddbfb1cf59
Merge branch 'trunk' into update/51111-payments-menu-item 2024-09-19 19:52:43 +03:00
Vlad Olaru e516a80b42
On suggestion enablement redirect to the same task page 2024-09-19 19:52:05 +03:00
Vlad Olaru 949a0db875
Do not recommend offline methods when WooPayments is supported 2024-09-19 19:51:18 +03:00
Vlad Olaru ab7ed21159
Add type hint 2024-09-19 19:50:28 +03:00
Vlad Olaru 955474dc4f
docs: Add details about our use of the Payments task logic 2024-09-19 19:50:11 +03:00
Vlad Olaru b7cad397bf
Improve logic to determine the Payments task slug by factoring in the extended task list also 2024-09-19 19:49:27 +03:00
Vlad Olaru 6b34220b1b
refact: Rename private static method 2024-09-19 19:48:42 +03:00
Vlad Olaru cbadd61264
WooPayments can't be connected or onboarded if it is not active 2024-09-19 19:48:18 +03:00
Vlad Olaru 17b85b761d
Improve WooPayments task complete logic 2024-09-19 19:46:27 +03:00
Vlad Olaru c5b12efcf1
Simplify WooPayments task view logic 2024-09-19 19:27:05 +03:00
Vlad Olaru fbd1464460
Simplify Payments task view logic 2024-09-19 19:26:24 +03: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
Vlad Olaru c82d8098e1
Lint fixes 2024-09-19 13:30:51 +03:00
Vlad Olaru 1117ce53a0
Remove short array syntax 2024-09-19 13:26:46 +03:00
Vlad Olaru 43c9581a4f
Merge branch 'trunk' into update/51111-payments-menu-item 2024-09-19 13:18:34 +03:00
Vlad Olaru 57d7a6705f
Add changelog entry 2024-09-19 13:16:56 +03:00
Vlad Olaru e5337d39bf
Render gateway suggestions on the WCPay task page, also 2024-09-19 13:15:30 +03:00
Vlad Olaru ddf430ffdc
Don't recommend additional gateways when WCPay is present 2024-09-19 13:10:18 +03:00
Vlad Olaru 67f89285d7
Introduce menu item when no incentive 2024-09-19 13:09:32 +03:00
Vlad Olaru e72756b0eb
Don't show the incentive page if the user can't manage WC 2024-09-19 13:08:52 +03:00
Vlad Olaru 6fe5cba053
refact: Rename register_payments_welcome_page to register_menu_and_page for clarity 2024-09-19 13:08:16 +03:00
Vlad Olaru 4709f85b64
refact: Rename must_be_visible to is_incentive_visible for clarity 2024-09-19 13:06:02 +03:00
Vlad Olaru 51033673ca
Minor cleanup 2024-09-19 13:03:04 +03: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
Jonathan Lane 2e69e94028
Exclude skipped e2e tests from auto-closure (#51528)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-09-19 09:02:04 +02:00
Chi-Hsuan Huang dfd7d52d6b
[beta tester] Simulate core error early in the request lifecycle before WP fully loaded. (#51330)
* Improve remote logging tool to simulate core error early in the request lifecycle before wp fully loaded

* Disable wp error handler when simulate_woocommerce_error
2024-09-19 12:22:53 +08:00
DAnn2012 2fc6528c61
Fix typo (task-list-completed.tsx) (#51484)
* Update task-list-completed.tsx

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-09-19 03:14:36 +00:00
Barry Hughes 34aa4f07f1
Update stable tag to 9.3.2 (#51522)
Update stable tag to 9.3.2
2024-09-18 14:06:54 -07:00
Alex Florisca 9b8256cc3e
[Feature] Express Checkout Improvements (#50791)
* 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>

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

* Synchronise the express payment settings between the Cart & Checkout blocks (#50688)

* Add express payment methods to sidebar

* Only add extra props for express payment methods

* Update docs

* Make title, description and gatewayId types optional

* Update docs

* Fix types again and editor side

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

* handle situation when no methods are active

* Update manifest

* Add express payment methods to inspector controls for express checkout block (#50983)

* Remove forced styles on the editor

* Remove the darkMode setting from the buttonAttributes API (#51109)

* Remove darkMode from the buttonAttributes API

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

---------

Co-authored-by: github-actions <github-actions@github.com>

* Accept supports declarations for express payment style controls + merchant ux improvements in the editor (#51296)

* Fix images in editor displaying weird

* Fix long express payment names breaking layout

* Default to uniform styles off

* Use heightControl for border radius and fix height for cart buttons

* Move formatting title and description to the config validation

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

* Fix linting

* Fix failing test

* Add back the 48px height for images in editor

* Fix linting again

* Update docs

* Update docs manifest

* Update docs to fix linting

* Add comment to test to better explain why we are expecting a console warning

* make strings translatable

* Sync cart & checkout directly without option

* Remove current styles

* Change the beta label

* Replace < and > with symbol references in docs

* Update docs manifest

* Increase padding of beta label

* fix linter issues

* change to using looger helper

* fix CSS

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2024-09-18 19:49:27 +00:00
Nathan Silveira 96719139be
Add global_unique_id parameter to products REST API (#51264)
* Add global_unique_id parameter to products REST API

* Remove unnecessary if statement related to commas and trim request content
2024-09-18 15:26:40 -03:00
Jonathan Lane 9d135ee2f5
Skip top flaky tests (#51510)
* Skip top flaky tests

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

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-09-18 18:43:12 +02:00
github-actions[bot] df37ccf8c5
Delete changelog files based on PR 51449 (#51477)
Delete changelog files for 51449

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-18 19:34:07 +07:00
github-actions[bot] 13f5eee40b
Delete changelog files based on PR 51441 (#51497)
Delete changelog files for 51441

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-18 19:33:24 +07:00
github-actions[bot] 8042fcdae3
Delete changelog files based on PR 51456 (#51496)
Delete changelog files for 51456

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-18 19:32:28 +07:00
Boro Sitnikovski ce66b55bc5
In app search improvements feature branch (#51413)
* Add search results count to the in-app marketplace (#51266)

* Add searchResults to context

* Use setSearchResults in Content

* Add ribbons to the tabs

* Changelog

* Use setState as the function name

* Only show ribbon counts when there's an active search

* Refactor how 'setSearchResultsCount' is used (h/t @mcliwanow)

* Don't populate initial search results

* Unify css styling

* Marketplace: bring back the loading state (#51342)

* Marketplace: bring back the loading state

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

---------

Co-authored-by: github-actions <github-actions@github.com>

* Remove in-app marketplace Search results tab and unify results into existing tabs (#51297)

* Remove search results component and any references to it

* Persist current tab for searching, or default to extensions if tab is not set

* Persist term when switching across tabs

* Lint

* When a search is initiated, fetch all categories to keep the tab counts up to date.

The necessary filtering to display data to the current screen will be performed on the frontend.

* Apply correct colors to the tabs, as per design

* Beyond query.term, also rely on isLoading so that search result counts don't jump

* Address an issue when the user searches for something that returns no results in the business services tab

* Changelog

* Addressed :)

* Change key to category

* Fix category filter being broken

Whenever a category is requested, we need to do an additional request with the category param being the current category (overriding extensions/theme/business services).

Ideally the backend API would make a distinction between type (theme/extension/business service) and category, but this hack should do for now.

* Lint

* Remove unused variables h/t @KokkieH

* Lint

* Revert "Lint"

This reverts commit 0b2d2dca6d.

* Actually fix lint without introducing infinite loop

Reproducible at http://localhost:8080/wp-admin/admin.php?page=wc-admin&term=payments&tab=extensions&path=%2Fextensions&category=customer-service

* Show category selector even if there are no results displayed

* Update comment to be less misleading

* Query isn't used here

* Update Marketplace search component (#51313)

* Update Search placeholder text

* Replace search component with one from @wordpress/components

* Make mobile search field font consistent with desktop

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

* Handle import errors for SearchControl component

---------

Co-authored-by: github-actions <github-actions@github.com>

* Marketplace: update category selector (#51309)

* Marketplace: update category selector

Remove the dropdown on the desktop view and show all items, even if
overflowing. Added helper buttons to scroll to the right to show more.

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

* Marketplace: remove category sroll helpers from tabindex

GitHub:
https://github.com/woocommerce/woocommerce/pull/51309/files#r1758448638

* Marketplace: Remove selectedTab reference from product.tsx

This is probably included due to the merge conflict

* Marketplace: tweak category scroll button narrower

---------

Co-authored-by: github-actions <github-actions@github.com>

* Lint

* Fix 2 lint errors

* Fix another lint error (useMemo) h/t @KokkieH

* Add load more button in-app (#51434)

* Add additional fields returned by search API to marketplace types

Ensure components have access to additional fields

* Add LoadMoreButton component

* Only render Load More button if there are additional pages of results

* Fetch and display next page of results in Load More button is clicked

* Simplify renderContent function to have less repetition

- Hide load more button while fetching results

* Improve loading of new products

- Ensure keyboard focus goes to first new product after Load More is clicked

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

* Add blank line to separate sections

* Set category param based on current tab when loading more products

* Improve busy-state screen reader text

Co-authored-by: Boro Sitnikovski <buritomath@gmail.com>

* Add missing dependency

* Move getProductType() function to functions.tsx

- Do not show load more button if isLoading state is true

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Boro Sitnikovski <buritomath@gmail.com>

* Rework the values used with `setSearchResultsCount`

After https://github.com/Automattic/woocommerce.com/pull/21678/files we
get a `totalProducts` so we can re-use that.

Also remove setting the counts when paginating since we set them to the
total.

* Add search complete announcement h/t @KokkieH

* Show update count only if greater than 0 h/t @andfinally

* Switch to Extensions tab if on My subscriptions when searching

* yoda

---------

Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
2024-09-18 14:14:30 +02:00
Ivan Stojadinov 4bc4649008
[e2e] External - Expand WPCOM suite, part 3 (#51422)
* Skip "Restricted coupon management" - error 500

* Make `wooPatterns` element more specific

* Skip "Merchant can view a list of all customers" - more customers due to using existing website

* No LYS on WPCOM

* Dismiss notice if shown

* Expand WPCOM suite

* Click on `Canada`

* Click on `Canada`

* Be more specific about `Delete` button

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

* Skip two more tests - WC patterns and block

* Remove usage of `networkidle`

* Handle notice if present with `addLocatorHandler`

* Fix ESLint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-18 13:24:38 +02:00
Néstor Soriano 16e072879b
Fix: "Import file path is invalid" in Windows (#51456)
* Fix WC_Product_CSV_Importer_Controller::check_file_path failing on Windows
2024-09-18 13:15:15 +02:00
Naman Malhotra 3df48f2bd7
Revert low stock notification changes (#51441)
* Revert - Change when stock notif emails are triggered

* added changelog

* restored comment

* restored more comment

* lint fixes

* Add docblock.

---------

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-09-18 18:12:23 +07:00
Ilyas Foo 6a83e8d301
Fix deprecation notice in coming soon and store-only mode (#51474)
* Wrap parse_str under a check

* Changelog
2024-09-18 18:06:38 +08:00
Maikel Perez f529d927a2
CYS: Fix Looker dashboard data (Track & display average loading times) (#51461)
* Track customize_your_store_assembler_hub_editor_loaded event to measure CYS loading time

* Add changelog file
2024-09-18 09:59:14 +02:00
Vedanshu Jain 3cdf45f69c
Modify API response tests to assert that expected key values are present (#51465)
Modify API response tests to assert that expected key values are present.

This differs from earlier assertion which checks for exact equality. However the earlier assertion was brittle and would fail when a new property is added, for example in https://core.trac.wordpress.org/ticket/61739.

With this change, any addition to schema will not breaking existing API tests.
2024-09-18 12:58:38 +05:30
Tung Du 1b58098848
[Experimental] Product Filters Chips style and new interactivity API implementation (#51393) 2024-09-18 13:16:07 +07:00