Commit Graph

64329 Commits

Author SHA1 Message Date
Adrian Duffell 8cbc799067
Update Core Profiler Industries (#47605)
* Update indistries list order

* Add arts and crafts

* Add sports and recreation

* Tweak size of dropdown to allow 9 items

* Add small screen size height restriction

* Add changelogs

* Update documentation

* Fix lint issues
2024-05-20 23:10:53 +08:00
github-actions[bot] cdc38bc4cc
Delete changelog files based on PR 47563 (#47621)
Delete changelog files for 47563

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-20 16:28:19 +02:00
Yan Sern 645b052376
Entrepreneur Signup: Show WordPress logo when entering Design With AI from Entrepreneur signup flow. (#47576)
* Show WordPress logo when entering Design With AI from Enterpreneur signup flow.

* Update logo on Assembler Hub.

* Really need to force it.

* Add changelog.

* Newline.

* Newline.

* Fix rebase error.

* Fix double import.

* Remove !important.
2024-05-20 15:43:24 +02:00
Barry Hughes 660b2bcb6d
If the Legacy REST API plugin is auto-installed once, do not auto-install a second time. (#47563)
* If the Legacy REST API plugin is auto-installed once, do not auto-install a second time.

* Remove unused private constant (PluginInstaller records the info we need in a sitewide option).

* Introduce the woocommerce_history_of_autoinstalled_plugins option

This option holds the same data as woocommerce_autoinstalled_plugins,
the difference is that the data in this new option is never deleted.
It's also never updated, it just holds the information of the
first autoinstall for each plugin.

* Add a migration to create woocommerce_history_of_autoinstalled_plugins

* More robust check of previous autoinstall of the plugin

* Change migration to run in 8.9.1 instead of 9.0.0

---------

Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2024-05-20 18:59:03 +05:30
Matt Sherman a6b0bb7138
Product Editor: Fix modal block editor crashing when Add button clicked with Gutenberg 18.3.0 (#47561) 2024-05-20 08:36:52 -04:00
Yan Sern caf1ee325b
Entrepreneur Signup: Hide site title when entering from Entrepreneur signup flow. (#47581)
* Hide site title when entering from entrepreneur signup.

* Add changelog.
2024-05-20 13:04:13 +02:00
Yan Sern ce42e92a80
Entrepreneur Signup: Hide progress bar when entering Design With AI from Entrepreneur signup flow. (#47574)
* Hide progess bar when entering Design With AI from entrepreneur signup flow.

* Add changelog.
2024-05-20 13:04:06 +02:00
Ilyas Foo 815d23bf09
Add `Cardo` and `Inter` fonts to global styles via theme json filter (#47417)
* Add global style font filter to add Cardo and Inter fonts when not available

* Changelog
2024-05-20 16:44:35 +08:00
Corey McKrill ad6eea6e00
Add an array_sum utility method to enhance PHP 8.3+ compatibility (#47595)
* Add validation for array_sum in Orders v1 controller

* Add an array_sum method to NumberUtil

* Update orders controller to use NumberUtil's array_sum

* Add NumberUtil array_sum to order item classes
2024-05-20 10:10:19 +02:00
Jonathan Lane 4d7a691953
Fix two flaky e2e tests (#47562)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-20 10:50:34 +03:00
Manzur Ahammed 7312f137d4
Display a notice for expired/expiring subscriptions along with a plugin update message. (#47076)
* add subscription expiry message on plugin list

* Update changelog

* fix lint

* refactor code

* update product price meta

* add tracks event for enable autorenew and renew subscription notices in plugin lists

* fix lint error

* check product price is set or not

* check product price is set or not

* added translator comment

* fix typo

---------

Co-authored-by: prahesa.setia <prahesa.kusuma.setia@automattic.com>
2024-05-20 03:06:03 +00:00
Sam Seay 8538ca3498
Make sure JS tests run in blocks when configs change (#47513) 2024-05-19 18:57:55 +12:00
Karol Manijak 96d951930c
Sync package.json and pnpm-lock.yaml (#47575)
* Add changes added automatically by install/postinstall

* Add changelog
2024-05-17 15:44:58 +02:00
Thilina Pituwala 52fef2c0c5
Remove old in-app marketplace pages and redirect to new in-app section (#47276)
* Remove the view file rendering old market-place page.

* Remove the function for rendering old market-place pages and introduce redirects to new in-app market-place.

* Remove unused code related to legacy market-place.

* Add exit after redirect.

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

* Redirect to search result page when a search term exists.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-17 20:19:11 +07:00
Adrian Moldovan 1b7279f78c
Fix git clone failing in Highlight Template Changes workflow after Git 2.45.1 release (#47579) 2024-05-17 16:01:19 +03:00
Dan Q edc22bca24
Add "Shared with you" badge to Extensions > My Subscriptions list as applicable (#46229)
* Add 'shared with you' badge

* Improve spacing where multiple badges span multiple lines

* Decrease font size of badges per new designs

* Include 'Manage on Woo.com' only for non-shared subscriptions

* Made TypeScript happier

* Add 'shared with you' badge

* Improve spacing where multiple badges span multiple lines

* Decrease font size of badges per new designs

* Include 'Manage on Woo.com' only for non-shared subscriptions

* Made TypeScript happier

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

* Addressing linter errors.

* Allow unusually-long email addresses of sharers to wrap

* Switch wordWrap for overflowWrap

Modern browesers interpret the former as an alias of the latter, including allowing the use of 'anywhere'. But the current version of https://www.npmjs.com/package/csstype only recognises 'anywhere' as valid for overflowWrap. Switching it prevents compilation errors, still exhibits the correct behavior.

* Prettier linting

* Update plugins/woocommerce/changelog/46229-add-wccom19063-in-app-shared-by-badge

Co-authored-by: And Finally <andfinally@users.noreply.github.com>

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

* Use pointer as cursor for status popovers

* Don't focus-within the status badge popover on load (prevents ugly link focus issue)

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2024-05-17 13:22:50 +01:00
Matt Sherman 5c393f1857
Product Editor: Add keyboard shortcuts for undo/redo to modal block editor (#47488)
* Add undo shortcut support

* Add redo shortcut support

* Add document overview shortcut support

* Move keyboard shortcuts to after interface store is registered in subregistry

* Move settings sidebar identifier to a constant

* Add settings sidebar shortcut support

* Changelog
2024-05-17 07:47:11 -04:00
Seghir Nadir 1ae7ca5179
Make checkout sidebar (order summary) sticky on desktop (#47376)
* Make sidebar sticky on desktop

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

* limit sidebar sticky to cart only

* add useless new line

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-17 13:13:01 +02:00
Karol Manijak 40b43e8d9c
Prevent collection different than Product Catalog from being filtered (#45820)
* Prevent collection different than Produyct Catalog from being filtered

* Adjust Product Filters tests

* Split taxonomies filter into seperate filter per taxonomy

* Add changelog

* Improve onDeselect function

* Update Product Filter test handlebars so they all use Product Collection that inherits query from template

* Set Product Collection to inherit query from template in PHP unit tests

* Remove unnecessary empty space

* Add changelog

* Update tests

* Fix lint

* Update Product Collection attributes in filter E2E handlebars

* Update the Product Filters testing pages title

* Satisfy TS by returning single React element rather than array of elements

* Revert some incorrect changes

* Cleanup after accidental incorrect merge

* Add template utils to dynamic contents util

* Fix Attribute Filter tests

* Cleanup Attribute tests, refactor and fix types

* Add product filter on top of attirbute filter in handlebars

* Fix lint

* Update Rating filter tests to use Product Archive template instead of post

* Update Rating Filter handlebars

* Update Stock filter tests to use Product Archive template instead of post

* Update Stock Filter handlebars

* Add more granular util to update Produyct Catalog based on handlebar template

* Use Product Catalog util and simplify test scenarios

* Unify handlebar templates

* Fix Product Collection attributes in Product Filter handlebar templates

* Revert temporary timeouts increase

* Remove unused types

* Cleanup types

* Cleanup types

* Lint fix

* Rename updateTemplatesContent to updateTemplateContents to better depict its purpose

* Fix types

* Rename updateProductCatalogContent to updateProductCatalogTemplate to better depict its purpose

* Allow for beforeAll and afterAll in PW tests

* Use beforeAll and afterAll instead of using fixture in active filters test

* Use beforeAll and afterAll instead of using fixture in attribute filters test

* Use beforeAll and afterAll instead of using fixture in price filters test

* Use beforeAll and afterAll instead of using fixture in rating filters test

* Use beforeAll and afterAll instead of using fixture in stock status filters test

* Get rid of updateProductCatalogTemplate util as it's too specific

* Extract some constants

* Remove unused file probably added here by accident

* Adjust Attribute Filter block tests to the new logic

* Merge fix

* Bring back necessary handlebars file

* Merge fix

* Merge fix

* Update beforeAll

* Avoid relying on product collection page object in before all

* Bring back the original order of tests

* Switch Filter by Attribute tests to handlebars

* Fix typo

* Update test to new circumstances

* Fix hooks usage
We no longer use hooks other than `beforeEach` since we're resetting the DB for each test (#46125). Using other hooks was not caught by the linter (on this PR) because I accidentally removed the no-hooks rule in #47228 and restored it just now in #47500. 😅

* Fix the test

* Fix Price filter test

* Update attribute filter tests

* Share the handlebars between tests

* Update price filter tests

* Update rating filter tests

* Update stock filter tests

* Remove unnecessary product collection page object from filter tests

* Fix typo

* Fix Filter by Stock test

* Simplify Attribute filter test by remoiving one filter from page

* Try to wait for element to be visible

* Fix handlebars syntax for filters so it doesnt throw validation errors and warnings

* Wait for filters to be visible for sure before performing further part of test

* Wait for Site Editor canvas loader

* Fix linter error

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-05-17 11:23:56 +02:00
Alba Rincón 5427aa5de8
Replace the default image of the Testimonial single pattern (#47535)
* Replace the default image of the Testimonial single pattern

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-17 11:00:51 +02:00
Vedanshu Jain e19110c564
Fix: Deleting a shop coupon using API returns a 500 error (#47474)
* Fix: Deleting a shop coupon via the API returns a 500 error

* Add unit test for coupon delete.

* Add changelog.

* PHPCS fix.

---------

Co-authored-by: 79mplus Admin <36501099+79mplus-admin@users.noreply.github.com>
2024-05-17 11:25:01 +05:30
Moon 15d146fa84
Fix lint errors with remote spec validator endpoint (#47520)
* Fix lint errors

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 15:25:59 -07:00
Ron Rennick db50513c42
use valid repository url in blocks package (#46696)
* use valid repository url in blocks package

* add changelog file

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-05-16 13:32:41 -07:00
Adrian Moldovan 9b8063f6b2
[testing workflows] Add optional jobs in CI workflow (#47414)
* Include performance tests job in the needed jobs for evaluation

* Use Github api to get the workflow jobs status

* Evaluate project-jobs

* See results

* Check for cancelled jobs

* Add evaluate-project-jobs.js and rename optional jobs

* Fix script path

* Checkout first

* And then fix the path again.

* Update env variable name and be more detailed in what are the required variables

* Use a flat matrix env variable

* Update to trigger test jobs

* Use the jobs name to evaluate optional requirement

* Fix conditions

* Prettier print

* Test lint job failure

* Remove unused MATRIX env variable

* Fix test

* Remove unused MATRIX variable check

* Only run my account e2e tests

* Remove unused function

* Nicer console printing

* Revert change that triggers failing lint job

* Force failing e2e test

* Revert e2e test command and forced failure

* Added test data and test mode

* Added more test data

* Fixed lint errors and warnings

* Exclude .github folder from eslintignore

* Change to trigger everything

* Revert change to trigger everything
2024-05-16 13:31:17 -07:00
Alexandre Lara 0a5ab942bd
[Experimental] Product Filters Redesign > Clear Button: Fix CSS Not Found error (#47481)
* Fix CSS error on Product Filter Clear Button

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

* Fix css lint error

* Remove unnecessary css file from Product Filter Clear Button block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 15:59:06 -03:00
Jonathan Lane ad19ff51a3
Add Buildkite reporting for e2e PR and daily runs (#47558)
* Add Buildkite reporting for e2e PR runs

* Set up Buildkite reporting on daily runs

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-16 15:31:21 -03:00
Seghir Nadir edb930e04b
Fix a11y issues in Cart/Checkout (#47470)
* return focus on drawer

* adjust notice button color

* adjust cart/checkout input label color

* return focus for shipping form button

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 18:32:22 +02:00
Matt Sherman d6288e2b2e
REST API: Add variation product type to response (#47377)
* Add type to response

* Add type to schema

* Changelog

* Update property count in schema test
2024-05-16 11:13:07 -04:00
Seghir Nadir 4f348eb540
remove the generic incompatible notice from Checkout block. (#47475)
* remove the generic incompatible notice

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 16:52:06 +02:00
Seghir Nadir 9b1e9344e0
Turn Cart change address link to button (#47460)
* Turn Change address link to button

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

* fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 16:51:03 +02:00
Bart Kalisz 90ee3f4ed9
Blocks E2E: Remove obsolete waitForSiteEditorFinishLoading util (#47547) 2024-05-16 16:39:30 +02:00
github-actions[bot] 7e01f4d39c
Delete changelog files based on PR 47514 (#47550)
Delete changelog files for 47514

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-16 16:25:37 +02:00
Damián Suárez 1f20bc5af1
Data: update getKey helper function (#47548)
* build key conidering all url params

* add getKet test with multiple parents

* changelog
2024-05-16 07:06:41 -07:00
Seghir Nadir a13013e9a5
Skip serialization for customer meta and be more defensive around loading it. (#47514)
* skip data serialization for customer meta

* keep casting as is

* skip old comment

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

* actually leave the comment, it still make sense

* reduce code needed

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 15:24:36 +02:00
Bart Kalisz a7bbdb99a2
Blocks E2E: Wait for Site Editor canvas loader (#47541) 2024-05-16 14:49:32 +02:00
github-actions[bot] 8bf9e966d4
Delete changelog files based on PR 47507 (#47543)
Delete changelog files for 47507

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-16 13:23:44 +02:00
Damián Suárez ff4422aff9
Product Block Editor: improve the process when creating a new attribute (#47518)
* introduce onAddNew() combobox property

* use onAddNew prop to handle adding new attributes

* changelog

* update packs after mergining with trunk

* move changelog file location

* remove unneeded change
2024-05-16 10:54:21 +01:00
Sam Seay fcc421d550
Update cart/checkout usage of the @wordpress/components Slot Fill (#47105) 2024-05-16 21:46:24 +12:00
Michal Iwanow 5cd46f48ad
Fetch Marketplace promotions - ensure callback is always registered for `woocommerce_marketplace_fetch_promotions` action (#47262)
* Marketplace promotions - ensure action is always there

We started getting errors 'Scheduled action for woocommerce_marketplace_fetch_promotions will not be executed as no callbacks are registered.' on some environments.

In this commit we ensure that WC_Admin_Marketplace_Promotions::fetch_marketplace_promotions() is always added as a calback to our action hook.

* Marketplace promotions - switch from Action Scheduler to transients

We're switching fetching marketplace promotions from using Action Scheduler
every 12 hours, to a 1 day transient. This makes it easier to ensure that
the requests are triggered only for admins, and that they don't impact frontend
users of the stores.

* Changelog

* Clear action from Action Scheduler

Action woocommerce_marketplace_fetch_promotions is no longer used, so we're clearing it when it's triggered.
Since we cannot self-clear the action, we're triggering a new single action when woocommerce_marketplace_fetch_promotions is run.
This new action's sole responsibility is to clear the original action.
2024-05-16 09:56:59 +02:00
Manish Menaria a7a1264fec
Fix input clearing issue in PriceTextField with improved currency parsing (#47354)
* Fix input clearing issue in PriceTextField with improved currency parsing

This commit addresses a usability issue in the PriceTextField component, highlighted by @dinhtungdu, where the input field would clear itself if users omitted a space between the numeric value and the currency symbol when the currency is configured to appear on the right with a space (e.g., "20$" instead of "20 $"). The problem was rooted in the strict parsing logic that did not account for variations in user input related to currency formatting.

The fix involves an enhancement to the numeric parsing function, which now effectively handles various user inputs regardless of space or placement of the currency symbol. The revised parsing logic uses a regular expression to strip out any characters that are not numeric or the designated decimal separator, and then replaces the locale-specific decimal separator with a period for standard numeric conversion. This approach not only fixes the specific issue but also improves the robustness of the component against similar input variations.

* Refactor currency parsing and improve handling in PriceTextField

1. Renaming `formatValueAsCurrency` to `formatNumberAsCurrency` to better
   reflect its functionality.
2. Moving the `convertCurrencyStringToNumber` function outside of the
   PriceTextField component, enhancing readability and reusability.
3. Changing the internal state handling from `newValue` to `inputValue`,
   directly managing the string input and parsing it as needed for further
   processing. This will force input field to re-render.

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

* Fix: Handle empty string in price conversion to prevent 0 value

This commit fixes an issue where an empty string in the price conversion function resulted in a value of 0. Now, empty strings are properly handled and do not convert to a numerical value.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 13:23:47 +05:30
Prahesa Kusuma Setia b669fc8526
Prevent calling wccom when the payload is empty for update check (#47507)
* prevent calling wccom when the payload is empty for update check public and non-public

* add changelog
2024-05-16 13:21:34 +07:00
Manish Menaria 1233fb4745
Fix: handle undefined templateSlug in Product Collection tracking utils (#47504)
* fix: handle undefined templateSlug in Product Collection tracking utils

The modification introduces a check for templateSlug before attempting to access its properties or use it in further logic. This change addresses a bug that manifested when users tried to edit a synchronized Product Collection block, resulting in a JavaScript error because templateSlug could be undefined.

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

* Update types to better reflect reality

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-05-16 11:17:52 +05:30
Chi-Hsuan Huang a120b99d7d
Fix coming soon page mobile UI issues (#47491)
* Update styles for WooCommerce coming soon page

- Add min-width to container for better responsiveness
- Adjust padding for smaller screens
- Update font size and text wrapping for banner

* Add changelog

* Improve readability
2024-05-16 12:46:26 +08:00
Chi-Hsuan Huang 9e32aafd38
Disable auto zoom when focusing on input for core profiler (#47400)
* chore: Add viewport meta tag for setup wizard

* Add changelog
2024-05-16 10:45:26 +08:00
Alexandre Lara 7abb996017
[Experimental] Product Filters Redesign: Add the Product Filters block (#47294)
* Add Product Filters block

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

* Add the blocks template for the Product Filters block

* Dynamically add the highest product count attribute to the block template

* wip: Add E2E tests for the Product Filters block

* Add E2E tests for the Product Filters block

* Add CSS file to Product Filters block

* Fix css error lint

* Fix lint error

* Fix lint errors

* Remove unnecessary styles for the Product Filters block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 18:09:48 -03:00
Fernando Marichal 8dd87820cf
Disable pre-publish panel (#47430)
* Disable pre-publish panel

* Add changelogs

* Fix e2e tests
2024-05-15 15:52:42 -03:00
Fernando Marichal f94d08a0db
Add Tracks events to Publish dropdown and Save draft button (#47320)
* Add product_switch_draft event

* Add "product_save_draft" tracks event

* Add schedule_publish and dropdown_open events

* Refactor saveDraft method

* Add changelog

* Rename const

* Add onToggle callback

* Refactor saveDraft method
2024-05-15 15:16:32 -03:00
Fernando Marichal aa6137128d
Move pricing features to General tab (#47435)
* Move pricing section

* Fix e2e tests

* Fix create-variable-product tests

* Add changelog

* Add changelog in WC
2024-05-15 14:53:27 -03:00
Moon bcd80f4c95
Bump beta tester to 2.3.1 to prep a new release (#47427)
* Bump version to 2.3.1 and add changelog

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

* Update readme.txt and clean up old changelog files

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 10:21:54 -07:00
Luigi Teschio 8c6efe072b
Blocks: Fix JS unit tests (#47516)
* Blocks: Fix JS unit tests

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

* trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 16:03:11 +00:00