Commit Graph

65704 Commits

Author SHA1 Message Date
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
Nathan Silveira 682f3fbe76
Add Notice generic block for the new product editor (#51740)
* Add Notice generic block for the new product editor

* Create reusable block for Notices

* Add changelog

* Fix wrong generic type
2024-10-02 10:10:57 -03:00
Tung Du f50620039e
Fix: React error in filter blocks due to duplicated renders (#51840) 2024-10-02 19:20:10 +07:00
Roy Ho 64df8a22c5
Replace __experimentalGetGlobalBlocksByName with stable getBlocksByName (#51773)
* Replace __experimentalGetGlobalBlocksByName with stable getBlocksByName

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-02 05:19:42 -07:00
Vladimir Reznichenko 27fc8f52c0
[dev] CI: fix changed files ownership identification when building CI-jobs matrix (#51848) 2024-10-02 12:02:21 +02:00
Ivan Stojadinov 9c514b3949
[e2e] External - Expand WPCOM suite, part 4 (#51424)
* Skip `can remove a coupon` - error 500

* Make elements more specific

* Skip two tests from order-emails.spec.js

* Skip `WooCommerce Page Load`

* Expand WPCOM suite

* Change hardcoded email address

* Unskip tests in order-emails.spec.js

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

* ESLint updates

* Check different locator for Marketing channels

* Skip "can receive completed email" for now

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-02 11:23:07 +02:00
Vladimir Reznichenko 6b5dbbc6ac
[dev] Fix for an error introduced in #51845 (#51847) 2024-10-02 11:00:16 +02:00
Vladimir Reznichenko d26816d41f
[dev] CI: skip linting and testing jobs when merging changelog deletion PRs into trunk (#51845) 2024-10-02 10:52:06 +02:00
Adrian Moldovan a7e6011816
[blocks e2e tests] Increase the shards number to 10 (#51842) 2024-10-02 08:42:53 +00:00
Arthur Normand 73e7d571ed
Fix: show correct attribute and price filter data on the category/tag template (#50341) 2024-10-02 08:16:50 +00:00
Tung Du 7bef8af7f2
[Experimental] Reliability fixes for new filter blocks (#51642) 2024-10-02 14:56:50 +07:00
Tung Du 5b0d44b906
Product Collection: fix price range posts clauses (#51676) 2024-10-02 05:30:26 +00:00
Christopher Allford b0e0a733d6
WooCommerce Asset Build Aliases (#43433) 2024-10-01 10:32:24 -07:00
Roy Ho 516b55b734
Ensure Product Collection filter names are consistently capitalized (#51779)
* Ensure Product Collection filter names are consistently capitalized

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

* Update e2e tests

* Add additional types and return empty string

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-01 06:56:59 -07:00
Vladimir Reznichenko c17d8519fe
[dev] CI: fix git checkout error in perfromance metrics job (take 2) (#51807) 2024-10-01 10:11:06 +02:00
Vladimir Reznichenko 9b925739fa
[dev] CI: fix git checkout error in perfromance metrics job (#51805) 2024-10-01 09:55:54 +02:00
Adrian Duffell 53a56cca77
Add core feature for site visibility badge (#51664)
* Add site_visibility_badge feature

* Update feature check on badge

Previously the WooCommerce Admin LYS feature flag was used, however this is slated to be removed in an upcoming release. This is updated to use the core level feature flag for the badge.

* Add changelog

* Fix lint issues

* Revert "Fix lint issues"

This reverts commit cf05d2b74f.

* Lint fixes

* lint
2024-10-01 15:40:43 +08:00
Vladimir Reznichenko ce5f7cb471
[dev] CI: drop baseline caching in perfromance metrics job (#51804) 2024-10-01 09:05:53 +02:00
Alexandre Lara e48b0352fe
Blocks: Add missing `wp-block-woocommerce-{name}` to Add to Cart with Options, Product Image, Product Rating, Product Rating Stars, Product Rating Counter and Product Image (#51558)
* Add missing classnames for WP blocks

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

* Fix unwanted extra whitespace within class property

* Remove unnecessary whitespace in class attribute for the Product Image block

* Remove unnecessary whitespace in class attribute for the Product Rating block

* Remove unnecessary whitespace in class attribute for the Product Rating blocks

* Fix php lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2024-09-30 12:41:20 -03:00
github-actions[bot] 632b4e98f4
Delete changelog files based on PR 51577 (#51777)
Delete changelog files for 51577

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-30 15:50:59 +01:00
And Finally a64e227fdc
Fetch promotions in a WP Cron job (#51650)
* Getting promotions in a WP Cron job to make them async. We don't want this request to affect the performance of wp-admin. See https://github.com/woocommerce/woocommerce/pull/47262#pullrequestreview-2241835763.

* Changelog.

* Made callback method `update_promotions` public.

* Linter errors. Whitespace.
2024-09-30 15:49:58 +01:00