Commit Graph

62484 Commits

Author SHA1 Message Date
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
Brent MacKinnon e995ee387d
Atomizing and tagging Endpoint documentation (#43833)
* Atomizing and taggig Endpoint documentation

* Create manifest.json

* regenerating manifest

* fix manifest

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-01-19 16:56:19 -05:00
Brent MacKinnon 73f50e61b3
Removing links from headings in docs where warranted. (#43824)
* Removing links from headings in docs where warranted.

* Fix readme capitalizion

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-01-19 16:43:59 -05:00
Veljko V 7f2fd37fad
Refactor code and merge checkout and coupon tests and add new restricted cart coupons tests (#43819)
* Add changelog and update var naming in block tests

* Format code in two tests

* Add missing payment method set to the test

* Refactor tests and merge cart checkout coupons

* Clear cookies before every test
2024-01-19 10:32:19 -08:00
Maikel Perez d174fb39db
[Enhancement] Add a featured product button (#43664)
* There's a star button on the right side of the name field. It's centered vertically.

* Clicking it marks the product as featured

* When hovered, we show a tooltip that reads: Mark as featured

* When clicked, the icon changes from star-outline to star-filled. Clicking it again reverts to the original icon.

* Add changelog file

* Change the tooltip text depending on the featured flag
2024-01-19 12:03:11 -03:00
Maikel Perez aa57be7c97
Hide the product type selector dropdown when click outside (#43798)
* Hide the product type selector dropdown when click outside

* Add changelog file
2024-01-19 08:32:59 -04:00
Mike Jolley 60509aa539
[Experimental] Surface additional checkout fields values in Admin order page. (#43748)
* 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

* Show address placeholders

* View fields in admin

* Pass order object and context to field hooks in WP admin

* CheckoutFieldsAdmin class

* Move logic to CheckoutFieldsAdmin

* Implement context

* Style checkboxes correctly in meta box

* Update handling

* Undo change to changelog

* Correct docblock comment for woocommerce_admin_shipping_fields

* Document context

* No need to init fields

* Fix checkbox handling for bw compat reasons

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

* Force CI

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

* Fix CSS rule

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-01-19 11:35:17 +00:00
Luigi Teschio f866d0d30f
[CYS - Core] Improve loading screen (#43791)
* CYS - Core: Create dummy products

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

* CYS - Core: Improve loading screen

* fix import

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

* update image

* add missing image

* fix CSS

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-19 12:03:19 +01:00
Jonathan Lane a0988461ec
[E2E] Tests for coupon usage restrictions (#43590)
* Changelog

* Tests for restricted coupons

* Update to test checkout not cart… which is what I should have been using

* Removal -- from PR feedback

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-19 10:49:24 +01:00
Alfredo Sumaran f2e90aa01d
Apply Rector suggestions for PHP 8.1 (#43237)
* PHP8 Fixes for templates dir

* Add changelog entry

* Bump template version

* Bump template version number

* Update changelog entry

* Typo
2024-01-19 10:07:53 +01:00
Alfredo Sumaran 5b6897e690
Apply Rector suggestions for PHP 8.1 (#43229)
* Apply Rector suggestions

* Add changelog entry

* Update changelog entry

* Fix PHP Lint errors
2024-01-19 10:07:06 +01:00
Niels Lange 32282a00ce
Add tracking for incompatible extensions (#42816)
* Add tracking for incompatible extensions

* Separate tracking data
2024-01-19 13:03:33 +07:00
Chi-Hsuan Huang 5bdc56e287
Fix activity panel showing incorrect currency (#43733)
* Fix activity panel showing incorrect currency

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

* Use store currency setting when order currency is different from the store currency

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-19 12:20:36 +08:00
Atanas Penchev 32ca8c16f2
Replace FlexSlider $.fadeIn() with vanilla .animate() (#41979)
* Vanilla .animate() instead of jQuery .fadeIn()

* Slider .animate() keyframes are now a list with 2 objects

[{ marginLeft: old }, { marginLeft: new }] keyframe syntax instead of
{ marginLeft: [old, new] } keyframe syntax for consistency

* Changelog

* Tweak changelog.

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-01-18 15:30:51 -08:00
Jacklyn Biggin c0198cc599
Update docs manifest regeneration instructions (#43802) 2024-01-18 18:20:40 -05:00
Ivan Stojadinov 50b4275174
[e2e] Expand simple product creation with more details (#43710)
* Expand 'can create simple non-virtual product' test

* Expand 'can create simple non-virtual product' test

* revert line break

* changelog add

* Revert "changelog add"

This reverts commit 0aa8f62cf7.

* Changelog - add update details

* Use getBy* where appropriate

* Add more geyBy*s

* Add more geyBy*s #2

* Add API calls to delete category and tag

* Update productCategory
2024-01-18 09:59:15 -08:00
Gan Eng Chin 6246cf6ff2
Marketing: Add "Sales" column in Campaigns card (#43284)
* Add sales property to MarketingCampaign class.

* Return campaign sales data in API.

* Display Sales in Campaigns card.

* Fix test for useCampaigns.

* Display a "-" when there are no cost or sales value in Campaigns card.

* Add changelog.

* Fix test for useCampaigns hook.

* Fix PHP lint issue.
2024-01-19 01:42:35 +08:00
Luigi Teschio c6e5d0d504
CYS - Core: Create dummy products (#43784)
* CYS - Core: Create dummy products

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 15:52:49 +01:00
Ron Rennick 45dc57f814
improve consistency on docs code blocks (#43758)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-01-18 10:38:23 -04:00
Alba Rincón 589259f39f
[CYS on Core] Intro screen - Update the copy depending on whether the user already started to customize their store (#43690)
* Add new banner for no-Ai existing theme

- Add new banner
- Update copy
- Refactor the theme preview structure

* Make preview optional

* Remove log

* Remove unused param

* Fix linting error

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 14:59:10 +01:00
Niels Lange 7cd04dfa5a
Add e2e test to hover Mini Cart totals (#43693)
* Add e2e test to hover Mini Cart totals

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

* Optimise hover test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 20:06:28 +07:00
Thomas Roberts bf61e57ce4
Ensure "email" field id does not include the section ID (#43734)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 04:33:50 -08:00
Albert Juhé Lluveras 91d0e16151
Convert block templates tests to parametized tests (#43778)
* Convert block templates tests to parametized tests

* Use frontendUtils.addToCart() when possible

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 13:29:07 +01:00
Albert Juhé Lluveras 6c3f8cb6fb
Add e2e tests to verify block templates can be customized if the theme has its own custom templates (#43650)
* Update commands to run e2e tests

* Capitalize Product Catalog template name

* Create tests with block theme with templates

* Create Block Theme with Templates test environment

* Update classic theme commands

* Code cleanup

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

* Code cleanup (II)

* Add config to blocks-playwright.yml and remove unnecesssary .github/workflows/playwright.yml file

* Remove unnecessary imports from product-catalog-template.block_theme_with_templates.spec.ts

* Update blocks e2e commands to pnpm

* Replace hardcoded strings with a variable

* Unify all 'block theme with templates' tests in a parameterized test

* Create a testData object for the Mini-Cart template part test

* Fix some code styling issues

* Create a testData object for the Mini-Cart template part test (II)

* Remove duplicate userText variable

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 11:39:24 +01:00
Manish Menaria 8c284a5074
[Product Collection] Add unique ID attribute (#43314)
* Add unique ID attribute to Product Collection block

In this update, we introduced a unique identifier for each instance of the Product Collection block. This change involves several key modifications:

1. **Block JSON Update**: Added a new `id` attribute in `block.json` to store the unique identifier for each block instance.

2. **Product Collection Content Update**: In `product-collection-content.tsx`, we utilized the `uuid` library to generate a unique ID. This is done in a `useEffect` hook, ensuring that each block instance receives a distinct ID upon initialization.

3. **Type Definitions**: The `ProductCollectionAttributes` interface in `types.ts` was updated to include the new `id` attribute, aligning with our enhanced data structure.

4. **Package Dependencies**: To support this feature, `@types/uuid` and `uuid` were added to `package.json`, ensuring we have the necessary tools for ID generation.

This enhancement is pivotal for uniquely identifying each Product Collection block, paving the way for more robust and individualized block handling in the future.

* Rename uniqueId to id

* Add lock file

* Add 'id' context to product collection and template

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

* Merge trunk with 42861-introduce-a-unique-identifier-for-each-product-collection-block

* Regenerate the lockfile

* Remove autogenerated change in plugins/woocommerce/package.json

* Regenerate lock file

* Rerun CI actions

* Delete pnpm-lock.yaml file & regenerate it using pnpm install command

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 15:30:57 +05:30
Brent MacKinnon 5f6e18e922
Removing notices that are no-longer-relevant (#43766)
* Removing notices that are no-longer-relevant

Removing "WIP" and "developer-level" notices, and fixing a few titles

* add updated docs manifest

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-01-17 18:17:14 -05:00
Brent MacKinnon 3765649a7d
Update payments-ux-guidelines README.md to swap a character that was encoding improperly (#43764)
Update README.md
2024-01-17 17:41:47 -05:00
Jacklyn Biggin 097f72774a
Update docs manifest for Product Editor Guidelines (#43752)
update docs manfiest
2024-01-17 12:47:05 -05:00
Jacklyn Biggin a786b57cd6
Fix metadata for product editor guidelines category (#43751)
fix metadata for product editor guidelines
2024-01-17 12:16:21 -05:00
Luigi Teschio 0a98e5acd6
[CYS - Core] Switch to TT4 when the flow starts (#43740)
* CYS - Core: add unit test

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

* fix description

* Enable TT4 when the customize your store process starts

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-17 15:09:12 +01:00
Jacklyn Biggin 658518b447
Update docs manifest (#43718)
Update manifest + fix duplicated key
2024-01-17 09:36:31 -04:00
Matt Sherman 824dc6be51
Remove BlockTemplateRegistry (#43589) 2024-01-17 07:12:12 -05:00
Vlad Bozdog 4966697b7f
41827-improve-coupon-usage-by-user-query-performance (#43731)
The sql query can be slow on big data sets, because the post meta value is type of string, and we are quering with a number.
2024-01-17 11:29:28 +01:00
Vedanshu Jain 90b3e11dba
HPOS: Remove buggy check in the data cleanup tool. (#43727)
* Add refund order to unit test.

* Remove buggy defensive check since existance of order is already verified.

* Changelog.

* PHPCS fixes.

* Added more assertions after cleanup to verify cleanup worked.
2024-01-17 14:58:11 +05:30
Damián Suárez 8878f00707
[Product Block Editor]: show three products by default in the Linked Products tab (#43698)
* pick three products by default

* changelog
2024-01-17 05:33:18 -03:00
Chi-Hsuan Huang 8b567dcbc7
Update payment partners 2024 q1 (#43514)
* Remove eway and zipco

* Add Airwallex

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

* Fix lint

* Update airwallex images

* Fix category_other value

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-17 09:40:08 +08:00
Alexandre Lara 8258919e22
Product Gallery block: Remove the experimental flag from the Product Gallery block (#43586)
* Remove the experimental flag from the Product Gallery block

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 21:05:47 -03:00
Jacklyn Biggin 42a90a317f
Rework UX guidelines to be in distinct folders and files (#43543)
* Rework UX guidelines to be in distinct folders and files

* Rename general guidelines to extensions guidelines

* Move contents of user-experience-guidelines.md into readme

* Rename "user experience guidelines" to "extension guidelines"

* Moved payments blurb from onboarding to readme

* Move product editor guidelines into a ux-guidelines folder

* Remove extra quote on payment guidelines image

* Add notice at top of theme customization page

* Fix linting issues
2024-01-16 16:04:53 -05:00
Karol Manijak 1dd23f8eeb
Product Collection: add E2E tests to Editor filters - by featured products, by created date, by price range (#43473)
* Add test to Product Collection - featured products filters

* Open Featured option before trying to set it up

* Add test for Created filter

* Add missing awaits

* Add tests for a price range filter

* Add explanation to test step

* Update the conditions for created filter

* Add changelog

* Change leftover values

* Empty commit - trigger CI
2024-01-16 20:59:27 +01:00
Brent MacKinnon 02b02ee23d
Further adjustment of post titles, menu titles, and tags (#43685)
* Adjusting post_titles, menu_titles, and tags for docs folder

Adjusting the post_titles, menu_titles, and tags for  document files in the docs folder

* Update removing-product-product-category-or-shop-from-the-url.md

* Update classic-theme-developer-handbook.md

* further adjustments and casing

* Move HPOS/CLI contents into README

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-01-16 14:29:00 -05:00
Matt Sherman 3838975b24
[Product Editor] Fix blank editor when clicking Add New while already in editor (#43702) 2024-01-16 13:04:48 -05:00
Ron Rennick 8a7ffac49b
add post tags support to docs manifest generator (#43575)
* Add tags to some readme files

* add post tags support

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-01-16 12:54:37 -05:00
Vedanshu Jain 4b401e59de
Add support for specifying filters when searching orders. (#43356)
* Add the UX element dropdown for search box.

* Add unit test for search_filter param.

* Add support for search filter in search query for better performance.

* Link search_filter dropdown with query param.

* Fix conflicts.

* Reformat to allow adding more filters in future.

* Fixing margin in the search filter box.

* Fix merge conflict.

* Apply linting.

* Add changelog.

* Apply PR suggestions.

* Grammer fixes.
2024-01-16 20:37:16 +05:30
Damián Suárez 0d878afb8e
[Product Block Editor]: add loading for the `Choose products for me` button (#43656)
* store is loading when chossing products for me

* disable choose btn when it's loading

* changelog

* restore is busy animation styles when disables

* restore changes

* fiox rebase issue

* restore disabling button
2024-01-16 10:35:03 -03:00
Mike Jolley 1dee94362f
[Experimental] Surface additional checkout fields on Order Confirmation page (#43449)
* 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

* Styling/spacing

* Update webpack config

* Register heading pattern

* Wrapper block type definition

* get_fields_for_location return fields in array format

* Use wrapper in default content

* Separate fields from the hook block

* Hide when no custom fields exist

* Address and contact fields

* Shared form fields in settings

* remove info block from wrapper

* Revert render_content to original

* rename block

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

* Update styling

* Create shared get_order_additional_fields_with_values to format values

* Update block names and descriptions

* Show address placeholders

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

* Unused import

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 13:17:28 +00:00
Damián Suárez ea3504b372
[Product Block Editor]: exclude the current product from the suggested ones to use in the Linked Product tab (#43662)
* exclude the current product from the suggested list

* changelog
2024-01-16 09:05:04 -04:00
Luigi Teschio dc0fd26917
CYS - Core: add unit test for the `NoAI` flow state machine (#43692)
* CYS - Core: add unit test

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

* fix description

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 14:01:31 +01:00
Damián Suárez 68fa0dd338
[Product Block Editor]: fallback with random products when no related products (#43584)
* add fallbackToRandomProducts option to getRelatedProducts()

* fallback to random when there isn't related products

* changelog

* update and tweak doc

* introduce POSTS_NUMBER_TO_PICK const
2024-01-16 09:13:55 -03:00
Thomas Roberts c776fb63bc
[Experimental] Add custom validation hooks for additional checkout fields (#43435)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 03:01:51 -08:00