Commit Graph

22176 Commits

Author SHA1 Message Date
Gabriel Manussakis 3c076b5187
[Accessibility] Improve checkout error messages (#49094)
* Improve required info for screen readers on checkout fields

* Add style to inline error message on checkout fields

* Add id attribute to terms error

* Improve accessibility of checkout errors messages

* Prevent screen readers from reading the asterisk on checkout fields

* Revert spacing change

* Revert spacing change

* Add changelog file

* Decrease line length

* Lowercase the required term

* Fix query methods in checkout tests

* Add space before required text for screen readers

* Fix query of shipping fields on legacy checkout tests

* Remove asterisk from field name on legacy checkout test

* Remove invalid character in Phone and Email fields on legacy checkout test

* Add asterisk to get phone and email by label on legacy checkout test

* Fix field labels for legacy checkout tests

* Fix php lint errors

* Add required tem to the Government ID input on tests

* Revert changes on required fields label

* Create checkout-inline-error-message mixin

* Replace SCSS variable with a CSS one

* Add checkout inline error message to T17

* Add checkout inline error message to T19

* Add checkout inline error message to TT

* Add checkout inline error message to TT1

* Add checkout inline error message to TT2

* Add checkout inline error message to TT3

* Include notice banner block in the notice selectors

* Add inline documentation to role attribute removal

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-10-18 18:00:46 +02:00
Joshua T Flowers 67fb81095f
Cache block asset resource hints (#51874)
* Cache block asset resource hints

* Combine resource hints under single cache transient

* Add AssetController tests

* Add changelog entry

* Skip cache use in development mode

* Fix up lint errors

* Revert init method back to protected and ignore linting

Co-authored-by: Mike Jolley <mike.jolley@me.com>

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-10-18 07:37:08 -04:00
Albert Juhé Lluveras 7125986053
Add sizes attribute to Product gallery thumbnail images to better load the appropriate resolution (#52073)
* Add sizes attribute to Product gallery thumbnail images to better load the appropriate resolution

* Add changelog file
2024-10-18 10:56:46 +02:00
Manish Menaria b4605c75e5
Fix: Multiple issues related to MySQL having ANSI_QUOTES enabled in Product Filters (#51316)
* Fix: Use prepared statements for stock status filtering

This commit addresses an issue where the "Filter by stock" block fails when used with MySQL that has ANSI_QUOTES enabled. The problem was caused
by the use of double quotes in the SQL query.

Key changes:
1. Replace direct string concatenation with wpdb->prepare()
2. Use placeholders for stock status values in the IN clause
3. Validate stock statuses against known options before querying

This fix ensures compatibility with different MySQL configurations and improves
the overall security of the query by preventing SQL injection vulnerabilities.

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

* Fix lint errors

* Fix lint issue

* Fix: Use single quotes for attribute taxonomy names in SQL query

- Addresses issue with Filter by Attribute block failing with ANSI_QUOTES enabled
- Prevents "Unknown column" errors for attribute names in SQL queries

* Fix: Use single quotes for SQL IN clauses

This commit addresses an issue where the Filter by Stock block fails when
the database has ANSI_QUOTES enabled. The problem was caused by the use of
double quotes in SQL IN clauses, which are treated as identifiers when
ANSI_QUOTES is enabled.

The fix involves replacing double quotes with single quotes in the following files:
1. plugins/woocommerce/src/Blocks/QueryFilters.php
2. plugins/woocommerce/src/StoreApi/Utilities/ProductQuery.php

This change ensures compatibility with databases that have ANSI_QUOTES
enabled, while maintaining the existing functionality for other configurations.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-18 09:46:32 +05:30
Chi-Hsuan Huang 8ad73e6b11
Remove "banner" layout option from inbox note (#52088)
* Remove deprecated "banner" layout option

* Add changelog

* Remove banner layout from test and beta tester

* Add changelog

* Add changelog
2024-10-18 03:24:34 +00:00
Alba Rincón 9937242035
Add new email for notifying customers when an order fails (#51778)
* Add new email for notifying customers when an order fails

* Remove references to the order completed template and bump versions

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

* Fix lint

* Improve default subject and heading

* Remove the additional content message

* Update copy for both emails
2024-10-17 17:11:45 -07:00
Chi-Hsuan Huang c9ab2d67af
Update core profiler redirect to jetpack screen logic (#52095)
* Update core profiler redirect to jetpack screen logic

* Add changelog

* Only redirect when jetpack is selected
2024-10-18 05:34:12 +08:00
Chi-Hsuan Huang 9e83d0cd6a
Hide platform selector text cursor (#52093)
* Hide text cursor for platform selector

* Add changelog
2024-10-18 05:34:00 +08:00
github-actions[bot] 2f97ab7338
Delete changelog files based on PR 51735 (#52122)
Delete changelog files for 51735

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-10-17 09:33:41 -07:00
Veljko V. 6eb01a2e35
Update editor util method to make it compatible with Gutenberg new labeling Block Inserter (#52107)
* Update string for Block Inserter

* Add changelog

* Update util method and add comment
2024-10-17 17:10:59 +01:00
Mike Jolley 3c830d6f3f
Add/cart link in checkout header 44837 (#51948)
* Cart Link Block WIP

* Add pattern for header

* changelog

* We added a header so update test

* Add wc-blocks-header-pattern class

* render_woocommerce_template_part was missing wrappers

* Add missing class

* Update plugins/woocommerce/src/Blocks/BlockTypes/CartLink.php

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Update plugins/woocommerce/src/Blocks/BlockTypes/CartLink.php

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Update plugins/woocommerce/src/Blocks/BlockTypes/CartLink.php

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Further SVG compression

* Remove unnecessary area handling

* Shared icon with mini cart

* Global style support

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-10-17 16:50:12 +01:00
Albert Juhé Lluveras 9f26128dc2
Fix fatal when OrdersTableMetaQuery::generate_where_for_clause_value() didn't return a string (#52065) 2024-10-17 08:54:46 +02:00
Chi-Hsuan Huang 47db965730
Update makepot-audit include path: Replace 'client' with 'assets (#52096)
* Update composer.json to include 'assets' folder and exclude client in makepot-audit command

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-17 14:03:37 +08:00
Pascal Birchler 9689a80fa4
Prevent early translation loading (#52055) 2024-10-17 11:04:36 +07:00
Roy Ho bd838d824a
[Experimental] Product filters/remove template parts (#52041)
* Remove product filters template part

* Remove product filters overlay template part

* Update e2e tests

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

* Fix linting

* Remove unused template part class and remove overlay navigation

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-16 14:02:25 -07:00
RJ 660eeec5cd
fix: i18n shipping region settings placeholder text (#52016) 2024-10-16 20:53:19 +08:00
Chi-Hsuan Huang 0eb9f36746
Update the `.distignore` file to exclude the ./client/admin folder from zip (#52052)
* Update .distignore file to exclude ./client/admin folder from zip

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

* Update .distignore

* Exclude /client/admin/ folder from zip in .distignore

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-16 20:46:35 +08:00
Joshua T Flowers cdfcd94358
Limit loading product block editor to admin pages and rest requests (#51954)
* Limit loading product block editor to admin pages and rest requests

* Add changelog entry
2024-10-16 06:57:06 -04:00
Karol Manijak 40a9656f7b
Product Collection: Fix JS error when client-side nav is disabled (#52039)
* Prevent accessing unexisting context in Product Collection

* Add changelog

* Remove unnecessary OR

* Change the approach to cleaner one

* Improve the condition
2024-10-16 12:03:29 +02:00
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
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
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 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
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
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
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
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
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
Vladimir Reznichenko d3b0f153ad
[dev] CI: feedback on updated perfromance metrics job (#51772) 2024-09-30 16:39:16 +02:00
github-actions[bot] 93b2ceb044
Delete changelog files based on PR 51734 (#51775)
Delete changelog files for 51734

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-30 14:55:18 +01:00
Boro Sitnikovski fae492632a
Fix subscription status and action items for free (lifetime) subs (#51628)
* Fix subscription status and action items for free (lifetime) subs

* Changelog

* Lint
2024-09-30 15:14:39 +02:00
Bart Kalisz 52d0b8c17d
Blocks E2E: Make test plugin namespace consistent (#51771) 2024-09-30 15:04:08 +02:00
louwie17 3826b8b2c3
Fix product form metabox issue on Safari 18.0 (#51734)
* Fix for styling issue in Safari 18

* Add changelog
2024-09-30 11:48:14 +00:00
github-actions[bot] 5907114d6e
Delete changelog files based on PR 51728 (#51770)
Delete changelog files for 51728

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-30 12:07:27 +01:00
Mike Jolley b852aff696
Remove alert role from informational notices (#51651)
* Remove alert role from informational notices

* changelog

* Status role
2024-09-30 11:54:34 +01:00
Jason Kytros 08b8dd99cc
Revert packages initialization timeline change (#51728)
* Revert packages initialization timeline change

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

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-30 11:17:17 +01:00
Ivan Stojadinov 9b3073999b
[e2e] External - Expand WPCOM suite, part 5 (#51745)
* Handle notice if displayed

* Make `Reply to comment` more unique, and wait for comment area to disappear

* Skip on WPCOM - error 404

* Fix copy/paste error

* Make area more unique

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

* Expand WPCOM suite

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-30 11:17:07 +02:00
Weston Ruter 38a2b5b3d8
Coming Soon: Return empty string from template_include filter instead of null to avoid PHP fatal error with conflicting plugins using strict types (#51751)
* Return empty string from template_include filter instead of null

* Update phpdoc return tag

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
2024-09-30 10:53:57 +02:00
Vladimir Reznichenko bc8067a1ce
[dev] CI: new version of perfromance metrics job (take 2) (#51710)
In this PR, we are re-iterating the job speedup and leveraging single wp-instance, incremental builds, and baseline reports caching. The original benchmarking tool is still available but bypassed as we evaluate results for this iteration approach.
2024-09-30 09:57:52 +02:00
Bart Kalisz bdaebbb69a
Blocks E2E: Fix db connection issues (#51658) 2024-09-30 09:54:46 +02:00
Sam Seay 19438505cf
#50557 - Order summary Shipping updates (#51608) 2024-09-30 17:53:01 +13:00
Maikel Perez 2e9ec00dd2
CYS: color swatches are not accessible (#51715)
* Add a11y to the color swatches

* Add changelog file
2024-09-28 13:25:55 -03:00
Alejandro Iglesias de13a47a2a
Pass extra CSS classes to the block (#50662)
* Pass extra CSS classes to the block

* get className using wrapper method

* amends from CR

* remove not needed class

* Merge remote-tracking branch 'upstream/trunk' into fix/add-extra-css-classes-to-product-image

* add missing variables

* fix lint error

* add changelog

* remove not necessary code

* add extra_classses parameter

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2024-09-28 08:43:02 +02:00
Paul Sealock c8a8ede22c
[Navigation] Remove feature (#51559) 2024-09-28 13:15:27 +12:00
Veljko V. ac7321e5b7
E2E Fix shopper mini-cart test (#51741) 2024-09-27 22:16:21 +02:00
Mike Jolley c0c162ee61
Delayed account creation: Use Block Hooks to inject block into the Order Confirmation template (#51582)
* Force block to be inserted after account summary

* Clean up block hooks

* Changelog

* Escape strings in default content

* Init $notice to prevent PHP notice
2024-09-27 15:13:26 +01:00
Mike Jolley 63637c0235
Fix postcode validation within the legacy cart show_shipping method (#51623)
* Postcode should be compared to empty string to prevent `0` passing.

* Changelog
2024-09-27 11:45:33 +01:00
louwie17 536bb4627e
Remove unnecessary line product button (#51729)
* Remove copy/paste line

* Add changelog
2024-09-27 10:06:21 +00:00
Tung Du 870111d8af
Product Collection: add price sorting options (#51670)
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-09-27 05:22:37 +00:00
Fernando Marichal 98053269ac
Add Dimensions controls to Product Collection block (#51420)
* Add dimensions to product collection

* Refactor width-options-control

* Add product-template changes

* Fix dimensions

* Add changelog

* Remove minHeight

* Remove className addition

* Small refactor in ProductTemplate

* Remove variable

* Fix lint

* undo product-template changes

* Add ProductCollection fixed width

* Fix set_fixed_width_style param comment

* Deconstruct WidthOptionsControl props

* Add line deleted by mistake

* Fix editor alignment

* Fix styles

* Add dimensions to templates and patterns

* Make styles setting more defensive

* Update plugins/woocommerce-blocks/assets/js/blocks/product-collection/edit/inspector-controls/width-options-control.tsx

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>

---------

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-09-27 05:04:16 +02:00
Ames Plant 6f1ac95c8d
[Accessibility] Add aria-label for page numbers within pagination (#50447)
* Add aria-label for page numbers within pagination

* Add changelog

* Fix innerText to camel case format

* Update plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Add screen reader text to the page numbers in the pagination partial

* Fix linting spacing errors

* Fix linting space remaining

* Bump template on pagination template

* Update plugins/woocommerce/templates/loop/pagination.php

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>

* Add aria-label to pagination numbers

* Improve logic to get current page number

* Rename $r parameter to $html

* Fix post-increment php lint error

* Account for two dots elements to add aria-label to page link

---------

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Co-authored-by: Gabriel Manussakis <9420947+Manussakis@users.noreply.github.com>
Co-authored-by: Gabriel Manussakis <gabrielmanussakis@gmail.com>
2024-09-27 02:42:58 +02:00
Alexandre Lara 4e0ebd83f4
WooCommerce > Block themes: Remove underline from sale prices (#51462)
* Remove underline from sale prices in WooCommerce block themes

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

* Improve css properties

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-26 15:26:57 -03:00
Jorge M 6ecf57df5a
Include global_unique_id in product export columns (#51703)
* Add global_unique_id to Exporter

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-26 18:03:14 +02:00
louwie17 4601416da2
Fix/51435 product collection flaky e2e test (#51663)
* Add a couple checks so the test doesn't move ahead to quickly

* Add changelog

* Remove visible condition
2024-09-26 12:03:06 -03:00
And Finally 729ad1780a
Change aspect ratio of images in theme cards in in-app marketplace (#51705)
* We are now using 16:9 images for themes in the in-app marketplace, so we need to change the image ratio.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-26 14:55:09 +01:00
Adrian Moldovan 645832da4b
[e2e tests] Remove basic-setup.spec.js (#51707)
Co-authored-by: Ivan Stojadinov <ivan.stojadinov@automattic.com>
2024-09-26 12:23:49 +00:00
Veljko V. 9b91256654
[e2e] External - Unskip analytics-data test on external sites (#51681)
Unskip analytics data test on external sites
2024-09-26 14:09:46 +02:00
Adrian Moldovan 294255b274
[e2e tests] Tag e2e tests that need to be reviewed (#51287) 2024-09-26 13:57:22 +02:00
Adrian Moldovan d9c42fbd27
[e2e tests] Remove test: can make sure WooCommerce is activated (#51706) 2024-09-26 14:57:07 +03:00
Albert Juhé Lluveras 97a0fc02ec
Add theme type to System Status Report (#51682)
* Add theme type to System Status Report

* Add changelog file

* Update tests

* Linting
2024-09-26 08:55:08 -03:00
Cem Ünalan 58434b8769
Marketplace: hide subscriptions with maxed connections and fix "not connected" badge (#51610)
* In-App Marketplace: hide subscriptions for maxed out connections

If we don't add this check, subscriptions with no connection allowances,
still show up in the "Available to Use" table. This can be misleading.

* In-App Marketplace: Fix My Subscriptions table row statuses

When there are multiple subscriptions for a product, we can't manage the
state between "installed" and "available to use". This commit separates
some of the functionality between the tables in the My Subscriptions
page.

1) Don't show "not connected" badge on the "available to use" table
2) Don't show the "update" button on the "available to use" table

We can't test the number two, because I noticed we no longer send the
verison number in the WCCOM endpoint

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

* Marketplace: remove unused useEffect

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-26 11:37:44 +00:00
Veljko V. 15f29b2ace
[e2e] External - Make themes util compatible with external envs and unskip relevant tests (#51509)
* Make themes util compatible with ext env and unskip relevant tests

* Add theme activation in test helper apis and update util

* Fix whitespace lint issue

* Make the util compatible with local and external envs

* Rename to activate theme

* Add theme name empty check

* Simplify theme util and update relevant tests

* Remove only from the test

* Add missing brackets to the shopper test

* Include error handling to see failure on  CI

* Include themes installation in the test setup

* Revert and refact util helper
2024-09-26 10:00:31 +02:00
louwie17 97620e2743
Add WooCommerce blocks to live storybook (#51679)
* Fix WooCommerce Blocks storybook

* Add blocks storybook to main storybook

* Add post build for iframe.html

* Only add WooCommerce Blocks when building storybook

* Use manager file again and add blocks build for storybook build

* Add changelog
2024-09-26 04:10:37 -03:00
louwie17 64c583fd73
Add missing wp block woocommerce classname (#51617)
* Update CatalogSorting classname to include wp-block class

* Add wp-block class name to the product button block

* Add wp-block classname to the product average rating block

* Add changelog

* Update changelog

* Fix lint issues
2024-09-26 04:00:11 -03:00
Gabriel Manussakis b017579815
[Accessibility] Fix typos in woocommerce-blocks e2e tests (#50738)
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-09-26 06:39:49 +00:00
Karol Manijak c687cdfbb6
Stop using unknown option for rsync during build process (#51696)
* Stop using unknown option for rsync during build process
* Add changelog
2024-09-26 07:07:19 +02:00
Barry Hughes 336e4f2d8a
Fix reference to `WC_Site_Tracking` (#51525)
Fix reference to `WC_Site_Tracking`.
2024-09-25 19:55:30 -07:00
Sam Seay 663a32f57a
50555 - Update button copy and change to outline button (#51609) 2024-09-26 13:17:38 +12:00
Sam Seay 018b73cd58
Add an option to mini cart block to navigate directly to checkout. (#51283) 2024-09-26 13:16:21 +12:00
Barry Hughes 37bb36994b
Update stable tag to 9.3.3 (#51692)
woorelease: Update stable tag to 9.3.3
2024-09-25 10:34:52 -07:00
Seghir Nadir 2f2d98ed45
Preserve dash in Mongolia postcodes (#51674)
* Preserve dash in Mongolia postcodes

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-25 17:24:52 +02:00
David Garcia Watkins bc56050569
[wcml-4848] Fixes for incorrect blocks in WC's refunds policy page (#51620)
* [wcml-4848] Fixes for incorrect blocks in WC's refunds policy page

Closes #51618

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-25 15:42:17 +02:00
Vladimir Reznichenko 3f4873bf3f
[dev] Monorepo: core build steps tweaks (copying assets) (#51612)
In this PR we aim to reduce filesystem modification when copying assets into the core by splitting copy tasks in three (one per source package) and using rsync over remove/copy combo.
2024-09-25 15:13:14 +02:00
Albert Juhé Lluveras 49fa0a7b1a
Allow setting the Shop page as the homepage in block themes (#51626)
* Allow settings the Shop page as the homepage in block themes

* Linting

* Add changelog file

* Fix SingleProductTemplateTests docblock

* Add unit tests

* Fix missing Shop page id

* Fix missing Shop page id (II)

* Fix missing Shop page id (III)

* Cleanup
2024-09-25 10:06:31 +02:00
Corey McKrill c4e758bab6
Redirect to canonical product permalink (#51637)
* Redirect to canonical product permalink

This ensures that if product permalinks are set to include the
%product_cat% replacement token, arbitrary values for that part of the
URL will redirect to the canonical product category value, rather than
successfully loading the single product page.

Fixes #24244

* phpcs exception

* Update plugins/woocommerce/changelog/fix-24244-custom-permalink

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-09-24 14:07:08 -07:00
Jonathan Lane 30ffbce09a
WC Cleanup plugin (#51593)
* WC cleanup plugin

* Fix linter errors

* More linter fixes

* Clean up spacing

* File doc comment

* Remaining linter problems

* Linter warnings too.  Sigh.

* Media cleanup, DB table cleanup, tax rate cleanup

* Exclude media files used in tests from cleanup

* Exclude media files regardless of extension

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-09-24 13:31:47 -07:00
Moon 12c2843458
Coming soon: Do not render header and footer if the theme does not support FSE (#51633)
* Render coming-soon template content without header and footer if the current theme is not a fse

* Check for store pages only

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

* Make sure get_the_block_template_html exist

* Lint fixes

* Lint fixes

* Lint fixes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-24 19:53:31 +00:00
louwie17 a979d95130
Replace setTimeout with callback function for more reliable E2E tests (#51653)
* Replace setTimeout with callback function for more reliable E2E tests

* Add changelog

* Remove removePreview logic from product collection page
2024-09-24 12:24:43 -03:00
github-actions[bot] 9f5bc4bc4e
Delete changelog files based on PR 51630 (#51656)
Delete changelog files for 51630

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-24 19:40:52 +07:00
Thomas Roberts 94460bb394
Check if the order needs shipping before validating shipping address (#51630) 2024-09-24 12:53:24 +01:00
Chi-Hsuan Huang 442cb4e81b
[Beta tester] Add tool for changing woocommerce.com base URL (#51537)
* Refactor WooCommerce Helper class

This commit refactors the WooCommerce Helper class in the `class-wc-helper.php` file. The changes include:
- Updating the comparison operator from `==` to `===` in the `activate_plugin` condition.
- Renaming the `get_install_base_url` method to `get_woocommerce_com_base_url`.
- Adding a new `get_install_base_url` method that returns the base URL for the plugin auto installer.

These changes improve the readability and maintainability of the code.

* Refactor data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion

- Refactor the data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion to use a dynamic base URL for the data sources.
- Update the deprecated DATA_SOURCES constant to an empty array in each class.
- Add a new method get_data_sources() in each class to return the updated data sources with the dynamic base URL.
- Modify the constructor of each class to use the get_data_sources() method instead of the deprecated DATA_SOURCES constant.

* Add changelog

* Add set-woocom-base-url tool

* Add changelog

* Rename woo_com and woocom -> wccom

* Change to falsy check !url

* Change woocom/WOOCOM to wccom/WCCOM

* Change default value to https://woocommerce.com/

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-09-24 19:37:57 +08:00
Jason Kytros 85a048f1fd
Resolved fatal error when applying Brands-restricted coupon (#51577)
* Resolved fatal error when applying Brands-restricted coupon

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-24 14:16:03 +03:00
github-actions[bot] 4858ae62aa
Delete changelog files based on PR 51631 (#51646)
Delete changelog files for 51631

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-24 18:01:46 +07:00
github-actions[bot] ccbd29054a
Release: Remove 9.4 change files (#51530)
Delete changelog files from 9.4 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-24 18:00:08 +07:00
github-actions[bot] 045d174fc0
Prep trunk for 9.5 cycle (#51529)
Prep trunk for 9.5 cycle with version bump to 9.5.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-24 17:59:48 +07:00
Manish Menaria a55812eba2
Product Collection: Update heading for Hand-Picked collection (#51643)
* Update heading for Hand-Picked collection

- Added 'recommend' to the keywords array.
- Changed heading content from 'Hand-Picked' to 'Recommended products'.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-24 16:14:07 +05:30
Vladimir Reznichenko bca89cb14f
[dev] pnpm install: speedup postinstall hooks a bit (#51538)
In this PR, we aim to improve the speed of ppm installs by making changes in ppm configuration and post-install hooks. The main principle behind the changes is to leverage the identified parallelization potential.
2024-09-24 08:34:46 +02:00
RJ 59aa209761
enhance/create wrapper for all external func using proxy (#51432)
* Create a wrapper function for all external dependency function calls for safety

* Add changelog

* Improve remote logger

* Update RemoteLogger.php

* Add changelog

* enhanced it to use proxy instead of individual wrappers

* lint

* lint 8

* Revert blocking=true change

* pr feedback

* fixed

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-09-24 10:49:47 +08:00
Barry Hughes 2a0ad34d99
Product CSV Importer > Restore expected default number of lines-to-import per batch (#51631)
Restore expected default number of lines-to-import per batch (product CSV import).
2024-09-23 14:46:01 -07:00
Tomek Wytrębowicz bef65063eb
Unhardcode menu titles for in page header (#51606) 2024-09-23 21:27:27 +02:00
Tomek Wytrębowicz 537818de6f
Ignore Analytics in the legacy `woocommerce_admin_reports` (#51592) 2024-09-23 21:11:56 +02:00
Mike Jolley 2c816457a9
Fix: get_checkout_fields() should return empty array if requested fieldset is not defined (#51508)
* If there is no fieldset, return an empty array instead of throwing notice

* changelog
2024-09-23 18:02:21 +02:00
Narendra Sishodiya 3ac409e03f
Fixed Fatal error call to a member function `is_empty() in mini-cart.php` (#51285)
* Fixed Fatal error call to a member function is_empty() in mini-cart.php:24

* Updated Template Version

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

---------

Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-09-23 17:59:47 +02:00
Joshua T Flowers 10b85cefb8
Only register block assets on the frontend during block render (#51517)
* Only register block assets on the frontend during block render

* Add changelog entry

* Add wc-blocks-registry as a dependency to product collection tester script

* Update docs manifest
2024-09-23 11:39:33 -04:00
github-actions[bot] 9647db4bb6
Delete changelog files based on PR 51541 (#51616)
Delete changelog files for 51541

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-23 22:02:50 +07:00
Seghir Nadir 07a0b8477b
Fix visual inconsisties in Cart/Checkout between elements and between Light/Dark modes (#51585)
* darker outline and double outline on focus

* flip outlines for shipping selector

* fix select outline in dark mode

* Fix input labels being cut off due to line height

* adjust outline colors

* fix rest of problems in dark mode

* fix express payment on checkout

* Fix broken styles for shipping cart in medium

* Always center input label

* Fix order note background in dark mode

* remove empty space in payment methods when there's no content inside

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

* fix linter issues

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-23 14:11:43 +02:00
louwie17 217f01c991
Add product dataviews without new nav (#51581)
* Add styling for dataviews with old nav

* Add toggle to toggle between new and old navigation

* Update dataviews dependency

* Fix width for list view

* Remove unused type

* Add changelogs
2024-09-23 08:51:55 -03:00
Manish Menaria fc6c932b1c
Fix: Prevent "is-descendent-of-single-product-block" from being added to external product URLs. (#51369)
* Fix: Prevent adding hidden input to external product forms with URLs

This commit addresses an issue where a hidden input field was being added
unnecessarily to external product forms that already have a URL. The changes
include:

1. Adding a check to determine if the product is an external product with a URL.
2. Only adding the hidden input field for products that are not external
   products with URLs.

This fix ensures that external product forms with URLs maintain their intended
functionality without the addition of unnecessary form elements.

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

* Fix lint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-23 16:17:21 +05:30
Eason f9cf25e8d7
Legacy reports: Decouple the dependency between the legacy reports and the WooCommerce Status widget on the dashboard page (#51566)
* Reverse the dependency on drawing sparklines in the legacy reports from the WooCommerce Status widget on the dashboard page.

* Add a new class to simulate the loading plugin for the legacy reports.

* Decouple the dependency between the legacy reports and the WooCommerce Status widget on the dashboard page.

* Break down the method of forming HTML for the sparkline in Dashboard widget to avoid directly outputting HTML via a filtered callback.

* Update PHP unit tests for WC_Tests_Admin_Dashboard.

* Add changelog.

* Ensure the backward compatibility for the `woocommerce_after_dashboard_status_widget ` action.

Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768751063

* Fix the incorrect indentation of a modified line of codes in the `WC_Admin_Dashboard` class.

Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768690182

* Fix a PHP 8 deprecation message due to a required parameter after an optional parameter in the `WC_Admin_Dashboard` class.

Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768776896

* Tweak the inaccurate PHPDoc for the `get_sales_sparkline ` method in the `WC_Admin_Report` class.

Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768804777
2024-09-23 17:08:47 +08:00
Chi-Hsuan Huang 31d847bd6f
Allow change remote spec data source base URL via filter (#51532)
* Refactor WooCommerce Helper class

This commit refactors the WooCommerce Helper class in the `class-wc-helper.php` file. The changes include:
- Updating the comparison operator from `==` to `===` in the `activate_plugin` condition.
- Renaming the `get_install_base_url` method to `get_woocommerce_com_base_url`.
- Adding a new `get_install_base_url` method that returns the base URL for the plugin auto installer.

These changes improve the readability and maintainability of the code.

* Refactor data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion

- Refactor the data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion to use a dynamic base URL for the data sources.
- Update the deprecated DATA_SOURCES constant to an empty array in each class.
- Add a new method get_data_sources() in each class to return the updated data sources with the dynamic base URL.
- Modify the constructor of each class to use the get_data_sources() method instead of the deprecated DATA_SOURCES constant.

* Add changelog
2024-09-23 15:10:40 +08:00
Tomek Wytrębowicz e4d0123a36
Fix taxes totals mismatch at reports table (#51218) 2024-09-22 22:04:52 +02:00