Commit Graph

65524 Commits

Author SHA1 Message Date
Vladimir Reznichenko e148229edb
[dev] Monorepo: consolidate syncpack config, regroup react and testing deps around react version (#52022) 2024-10-16 09:55:36 +02:00
Ilyas Foo 3237def0ef
Fix products base incorrectly matching pages with the same prefix (#52028)
* Fix product base incorrectly flagging as store pages on pages with same prefix

* Changelog

* Remove unused code

* Lint

* Lint

* Slightly moved some codes, improved comments, added extensive examples
2024-10-16 12:30:54 +08:00
Ilyas Foo e49009b9a9
Fix core profiler extensions page from selecting activated plugins (#52029)
* Add check to disallow selecting activated plugins

* Changelog
2024-10-16 11:00:36 +08:00
Maikel Perez 63fdf72645
New Product Editor: For Grouped Products, the pricing fields are displaying even though they shouldn't (#51987)
* Disable pricing fields when the product type is grouped

* Add changelog file

* Fix php linter error
2024-10-15 09:42:04 -03:00
Maikel Perez ddb7e8380c
Product Editor: Alignment of SKU and GTIN fields is off (#51988)
* Fix the icon alignment when shown as part of the input label

* Add changelog file
2024-10-15 09:39:53 -03:00
nigeljamesstevenson 68819839d2
Delete plugins/woocommerce/changelog/51912-fix-rest-api-fatal 2024-10-15 13:19:28 +01:00
Mayisha c5ada6a753
Create HPOS tables if they do not exist when enabling compatibility mode (#51973)
* create HPOS tables if do not exist when enabling compat mode

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

* remove undefined variable from log

* add newline

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-15 10:18:19 +02:00
Brian bca41d4c18
Check for empty value in get_order_id_by_order_key() (#40254)
* check for empty order key

* reverse flow

* Update class-wc-order-data-store-cpt.php

* tabs to spaces

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

* spaces to tabs

* fix lint issue - 477 | ERROR | Whitespace found at end of line

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-10-15 06:32:53 +00:00
Vladimir Reznichenko ebeefdd315
[dev] Monorepo: relax webpack TypeScript errors (turn into warnings) (#51993)
In this PR, we introduce and integrate a new webpack plugin, which hooks into `fork-ts-checker-webpack-plugin` and turns the specified TypeScript error codes into warnings to enable React 18 migration.
2024-10-15 08:21:56 +02:00
Sam Seay be85cd3dcb
Improve Twenty Twenty-Five theme compatibility for cart and checkout (#51725) 2024-10-15 16:47:20 +13:00
Luigi Teschio 0951f5fe1b
Fix `Error: Failed opening required '.../wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/AI/ProductsSchema.php` fatal error (#51912)
* Revert "CYS - Move the `private/patterns` endpoint to woocommerce admin API (#50400)"

This reverts commit 091141218e.

* Revert "CYS - Move the `ai/products` endpoint to woocommerce admin API (#50396)"

This reverts commit ae6f7837b2.

* fix endpoint

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

* fix e2e test

* add declare strict type declaration

* Add strict_types to Products route class file

* Remove old TODO comment

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-10-14 11:07:38 +02:00
Ames Plant 65efc7398f
[Accessibility] Announce to screen readers when the variations have been cleared (#50183)
Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
Co-authored-by: Gabriel Manussakis <gabrielmanussakis@gmail.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Gabriel Manussakis <9420947+Manussakis@users.noreply.github.com>
2024-10-14 14:58:14 +13:00
Sam Seay 12d9486d31
Checkout: validate empty cart state before placing an order. (#51810) 2024-10-14 14:05:35 +13:00
Tomek Wytrębowicz e0e68866a4
Fix Analytics Dashboard rendering for malformed preferences (#51947) 2024-10-11 19:08:09 +02:00
Vladimir Reznichenko 8502f5141a
[dev] Monorepo: monorepo-utils webpack config housekeeping. (#51998) 2024-10-11 14:46:37 +02:00
Vladimir Reznichenko f469bba6f2
[dev] Monorepo: improve changelogger prompts in CI. (#51995) 2024-10-11 11:53:36 +02:00
Ron Rennick a16f11ad6e
Merge React Admin (#49647)
* moved files

* changed paths

* changelogs

* added eslintignore for admin subfolder as it has its own eslint command

---------

Co-authored-by: rjchow <me@rjchow.com>
2024-10-11 11:31:11 +08:00
Daniel Mallory 6f73f67630
Update broken docs links (#51967)
* Update broken docs links.

* Add changelog
2024-10-10 17:37:27 +01:00
Ricardo Metring 0107d1edad
Add to Cart with Options: Add Stepper option (#48876)
* Add To Cart Form: Improve the default style and add the Stepper style

* fix height button when no variation is selected

* not allow the user to set 0 as value of the input

* format css

* fix padding

* format css

* fix CSS

* unset margin to align with the button

* Fix quantity stepper layout

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

* improve layout editor side

* remove not necessary changelog

* improve escaping

* fix webpack configuration

* add E2E tests

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-10-10 16:36:49 +02:00
And Finally 485f00f97b
Fix media queries for iOS Simulator in in-app marketplace (#51979)
* Replace `@media (width <= $breakpoint-medium)` queries with `@media screen and (max-width: $breakpoint-medium)`. iOS Simulator doesn't seem to support the previous query syntax.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-10 09:37:47 +01:00
Alfredo Sumaran 6a5a4f14d1
Improve HPOS checkbox description for better understanding (#51962)
* Improve HPOS checkbox description for better understanding

* Update description

* Add changelog entry
2024-10-09 10:08:05 -05:00
Vlad Olaru 1aeb7486d5
Update WooPayments Payments task install and/or activate behavior (#51956)
* Ignore payment gateway suggestion ID variation part

When searching for the current gateway ID we will ignore the
part after :.

* Use a connect link when no WCPay account connected

This allows us more control over where to direct the user.

* Use the individual payment gateway enablement flow for WCPay

* Add changelog

* Add changelog

* Fix lint errors

* Prevent recalling installAndActivate when autoinstalling

If we have installAndActivate as a dependency, when isRequesting becomes false
it will cause a second, needless installAndActivate call and we end up with two
snackbar notices about plugins being installed and/or activated.

* Replace deprecated Button props

* Make the plugins installed&activated notice message more informative

* Fix object check

* Add changelog

* Remove WooPayments task item fill and use standard task item

* refact: Separate get suggestion

* Provide WCPay task action from PHP

* Don't point directly to WCPay pages, use connect links instead

* Remove WCPay action URL logic from the main Payments task

If WooPayments is supported, the dedicated task will superseed
the default payments task. There is no need to have special action
URLs.

* Lint fixes

* Use a WCPay connect link to defer to the client logic

* Fix WCPay task link when incentive is available

* Lint fixes
2024-10-09 17:09:46 +03:00
Jonathan Lane 5110f71382
Update block checkout tests and product creation tests for WP 6.7 compatibility (#51965)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-10-09 07:17:47 +03:00
Adrian Moldovan a35e55081f
[ci-jobs] Add new unit tests to validate the prerelease WP offer flow in jobs matrix (#51880) 2024-10-08 15:49:31 -05:00
Adrian Moldovan cb77b90622
[e2e tests] Fix broken gloabal-teardown with WP 6.7-beta1 (#51958) 2024-10-08 19:21:26 +03:00
Joshua T Flowers ee9074c8a9
Cache block pattern data (#51802)
* Cache block pattern data to optimize pattern registration

* Add tests around block pattern registration

* Test cached block pattern registration

* Add tests around invalid cached data

* Remove unused mock package

* Add changelog entry

* Fix up linting issues

* Bump transient time up to one month
2024-10-07 22:33:57 -04:00
Naman Malhotra 9d2ab83b8a
New CFE flow (#51182)
* Create changelog during build step

* removed changelog generation during code freeze step

* lint fixes

* modified monorepo messaging

* Added changelog

* added workflow dispatch

* version override

* renamed file

* New CFE workflow (#51207)

* New CFE workflow

* added slack notifications

* lint fixes

* continue workflow only if the label is present

* Bump to github scripts v7

* Moved notification to core releases daily channel

* New CFE workflow notifications (#51466)

* New CFE workflow notifications

* added notification for woo release slack channel

* add woo core daily slack channel

* remove github debug

* change notification channel to Woo core releases

* New CFE workflow GitHub template (#51468)

* New CFE github template

* review changes

* review changes
2024-10-08 03:41:03 +07:00
Jonathan Lane 33f494673a
Implement WC reset during e2e setup on external environments (#51720)
* Re-implement changes from branch

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-10-07 22:18:52 +03:00
Jonathan Lane 82620000d4
Update locators for QIT compatibility (#51945) 2024-10-07 14:14:09 -05:00
Mike Jolley 6604e6bad2
Delayed Account Creation Test Coverage (#51852)
* Sample test

* Jest tests

* Fix spinner

* Add e2e test to check registration works

* Classes were renamed

* wc-block-order-confirmation--create-account-button remove double hyphen

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

* woocommerce-blocks-test-enable-experimental-features

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-07 11:12:37 +01:00
Roy Ho 701d9341dd
Skip flaky tests for now (#51889)
* Skip flaky tests for now

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-06 11:56:23 -05:00
Roy Ho 7542487156
Product Collection: Remove best selling filter option (#51865)
* Remove best selling filter option

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

* Add tiebreak fallback in case total_sales is 0 which prevents random order

* Remove test_merging_order_by_popularity_queries as it is not needed

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-06 11:53:27 -05:00
Michal Iwanow 72ab844855
Fix clearing search input in In-App Marketplace (#51916)
* Fix clearing search input in In-App Marketplace

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-06 10:13:56 -05:00
Narendra Sishodiya 37903778fb
Replace Congratulations view Buttons with Links (#51654)
* ../woocommerce-admin/client/customize-store/transitional/index.tsx

* Delete plugins/woocommerce/bin/composer/phpcs/composer.lock

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

* Delete plugins/woocommerce/bin/composer/phpunit/composer.lock

* Delete plugins/woocommerce/composer.lock

* Reverted the changes

* Reverted the changes

* Reverted the changes

* Reverted the changes

* Reverted the changes

* Reverted the changes

* Reverted the changes

* Implemented Suggested Changes

* Implemented Suggested Changes

* IMplemented the Suggestions

* Removed navigateOrParent as it is not needed.

* Updated test case in  index.test.tsx

* Revert the change

* Implemented suggestions

* Update transitional.spec.js

* Update transitional.spec.js

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Co-authored-by: root <root@LAPTOP-I3Q9TGEL>
2024-10-04 17:10:24 +02:00
Néstor Soriano cbf98a0912
Add the Cost of Goods Sold related code and REST APIs for the product class (#51675)
* Fix a bug in FeaturesController.

The UI for a non-legacy feature was showing up greyed out
("UI disabled") when the setting that controls the feature
was off ("feature disabled").

* Add the CostOfGoodsSoldController class.

* Add COGS related properties/methods to the product and variation classes.
Also update the data stores appropriately.

COGS values will be stored in a "_cogs_total_value" product meta key,
but only when the value is not zero.

For variations, a flag indicating if the COGS value overrides
the parent value will be stored in a "_cogs_value_overrides_parent"
product meta key, but only when the value is true (stored as "yes").

* Add filters to customize the COGS related data as it gets loaded or saved.

* Add COGS related functionality to the REST API
(get/create/modify products and variations endpoints).
2024-10-04 11:57:52 +02:00
Néstor Soriano ddfa425062
Modify product import file check to use the WP filesystem API (#51540)
* Modify product import file check to use the WP filesystem API.

Otherwise it doesn't work on environments that don't have
a direct filesystem like e.g. WordPress VIP.

* Add the FilesystemUtil::get_wp_filesystem_method_or_direct method
2024-10-04 08:50:54 +02:00
Roy Ho 7c48112d4a
Fix product collection flaky sales filter option (#51897)
* Fix product collection flaky sales filter option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-03 17:10:45 -07:00
Amin Abdolrezapoor ee4f1aad3d
Fix wrong type passed to `add_meta_boxes` action (#51598)
* Fix wrong type passed to `add_meta_boxes` action

* revert changed parameter of `do_meta_boxes` to `WP_Post` object

* Add `woocommerce_order_editor_add_meta_boxes` in order editor

* Move changelog entry to correct directory
2024-10-03 09:53:46 -07:00
Boro Sitnikovski d3765b43c0
Add BFCM promo (#51739)
* Populate `window.wcMarketplace` for Marketing > Coupons

* TEST CODE: Add promotions dummy data to the endpoint for now

See [this comment](https://github.com/Automattic/woocommerce.com/issues/21783#issuecomment-2376471712) as to how we plan to manage this through WCCOM

* Initial implementation of the `<PromoCard>` component

This commit does the following:

- Implement the `PromoCard` component
- Refactor the existing `Promotions` component
    - Extract types
    - Add support for conditional rendering based on `pathname`
    - Accept optional parameter `promoCardOnly`
- Renders `PromoCard` wherever needed, as requested in the project thread.

Some remaining TODOs:

1. Dismiss functionality
2. Tracking
3. Figma design adjustments
    - CSS styling (Flexbox in Marketplace, etc.)
    - Percent image, wherever needed
    - Background image
4. BWC testing (e.g. ensuring that "Get more for your money" banner still works)

* Make sure that WCCOM also returns path so that earlier versions of in-app marketplace don't break (path undefined error)

* Update T&C link

After https://github.com/Automattic/woocommerce.com/issues/21840

* Implement promo banner dismissal logic and tracks

* Styling the WooCommerce > Extensions version of the promo component.

- Tweaked data on `class-wc-admin-assets.php` to pass `style` and `icon` attributes for that promo.
- Moved promo on this page from the marketplace `Header` component to the `Content`, above the Sales Banner notices.
- Deleted `percent.svg` and moved its content into a React component.
- CSS tweaks for this style of promo.
- Changes to elements of `PromoCard` component to allow the layout for this style.

* Fixed some TypeScript issues.

- Added guard condition in case `promotion.id` is undefined.
- Returning null if it isn't - but below `useState` hook, so we conform to rules of hooks.
- Setting default value for `promotion.cta_label` to satisfy TypeScript, which expects a node.

Style tweaks to `.promo-cta`. Vertical centering of text, hover colour, margins.

* Remove unnecessary unique identifier for each promo, and use a smarter way (URIs) to gather the visibility data

* Lint

* Revert test code

* Changelog

* Better code comments

* Changed `promoCardOnly` attribute of `Promotions` to `format`, to allow for more types in future.

* Update plugins/woocommerce-admin/client/marketplace/components/promotions/promotions.tsx

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

* Styling promo cards at different breakpoints.
Moved homescreen promo to after store management links.

* Added condition to merge array of promos with the main `$promotions` array.

* Added `useEffect` so we only record Track event for view of promotion once.
Changed Tracks prefix to the shorter `marketplace_promo_`.

* Added Tracks events for both formats of promotions, `promo-card`, and the original `notice`.

* Merging two style blocks.

* Passing `format` to `recordEvent` instead of hard-coding it.

* Addressing linter errors.

* Moved operation merging promos into the main array into a separate method for greater clarity.

* Moved Promotions component on WooCommerce > Home to below task list.

* Styling tweaks.
Increased schedule of `woocommerce_marketplace_cron_fetch_promotions` cron job to twice daily.
Added guard conditions in `Promotions` in case `window.wcMarketplace.promotions` isn't defined or isn't an array.

* Reduced SVG size to 72px.

* Fixing linter error.

* Style tweaks. Using WP components colour vars for CTA and dismiss links.

* Fixing linter error.

* Reverting change to `schedule_cron_event`, as this method will not be present if only this branch is cherry-picked.

---------

Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2024-10-03 15:36:06 +01:00
Vladimir Reznichenko a0dd5b27d9
[dev] CI: update performance metrics job (#51881) 2024-10-03 13:49:55 +02:00
Vladimir Reznichenko e914c862a0
[dev] CI: revisit ci-workflow skip strategy. (#51876)
In this PR, we update the skip strategy for ci-workflow to use the GitHub actions feature and simply filter out the changed paths (skip docs, changes).
2024-10-03 11:11:27 +02:00
Adrian Moldovan 2276fded32
[ci-jobs] Add support for beta and RC WordPress versions (#51814) 2024-10-03 11:28:47 +03:00
Karol Manijak 7d9dc8b08d
Remove Product Collection wrapping div (#51733)
* Remove Product Collection wrpping div

* Add changelog

---------

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
2024-10-03 08:05:04 +02:00
Jonathan Lane 4f3e310dcd
Add a retry on the setup test environment step (#51871)
* Add a retry on the setup test environment step

* Minor change to an e2e test to trigger CI

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

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-10-03 00:53:53 +02:00
Ivan Stojadinov 24a2e43bd4
[e2e] External - Consolidate `playwright.config.js` for WPCOM (#51857)
* Merge all listed /merchant files

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-02 23:15:28 +02:00
Alba Rincón 5c57da5e82
Add a retry mechanism to obtain the lock for inserting products through the API (#51735)
* Add a retry mechanism to the query to obtain the lock for inserting products in the API

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

* Log errors after failed attempts and delay 10ms for each attempt

* Fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-02 09:06:40 -07:00
Albert Juhé Lluveras ecfafb50b6
Add Products by Brand template label (#51846)
* Add Products by Brand user-friendly title to the New template popup

* Add changelog file

* Update WC_Brands class version
2024-10-02 16:24:45 +02:00
Maikel Perez 4d7d049477
CYS: Investigate multiple requests being made to the patterns endpoint (#51819)
* Notify wc/admin/options store changes after the data is saved in the server and not before

* Add changelog file

* Remove the subscription to the OPTIONS_STORE_NAME since its trigered many times, using useSelect instead

* Add changelog file
2024-10-02 11:08:49 -03:00
github-actions[bot] 9be9fd9707
Delete changelog files based on PR 51664 (#51850)
Delete changelog files for 51664

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-10-02 06:44:59 -07:00
Roy Ho 31c675f93d
Add order by sales filter option to product collection (#51790)
* Add order by sales filter option to product collection

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-02 06:16:16 -07:00