Commit Graph

62934 Commits

Author SHA1 Message Date
louwie17 ddbbccf5a3
Fix download buttons in downloads section (#44816)
* Remove use of subsection actions and fix add support for subsection and section in SectionActions

* Add changelog

* Make sure subsection description block will still work.
2024-02-20 14:35:27 -04:00
Nathan Silveira ff23d1ed21
Prepare @woocommerce/product-editor for release 1.4.0 (#44817)
Prepare for release 1.4.0
2024-02-20 18:33:11 +00:00
Damián Suárez 3b4cb31d4e
[Product Block Editor]: do not include current product in the suggested products list (#44815)
* exclude current product from suggested list

* changelog
2024-02-20 14:30:01 -04:00
Nathan Silveira 9fa9431534
Export Notice component in @woocommerce/product-editor (#44812) 2024-02-20 15:01:38 -03:00
And Finally a1a671d872
Fetch promotions from Woo.com and show bubble on Extensions menu item, if required (#44655)
* Added `WC_Admin_Marketplace_Promotions`, with logic to get promotions from https://woocommerce.com/wp-json/wccom-extensions/3.0/promotions and display them

- Calling `init_marketplace_promotions` on `woocommerce_init`. If we're on the WooCommerce Home or Extensions pages, this calls `fetch_marketplace_promotions` to get promotion data from the transient or else the API.
- If we're on any admin page, calls `show_bubble_promotions` to render menu item bubbles, if there are any.
- Changed method `WC_Admin_Addons::fetch_with_locale` to `WC_Admin_Addons::fetch` and added `$options` parameter, so we can fetch without passing locale. We want to keep requests for promotions as uniform as possible for better caching.

* Fetching promotions on all pages in the WooCommerce admin menu.

* Changed WC_Admin_Marketplace_Promotions to fetch promotions in a scheduled action.

* Added extra condition to check if `$auth['access_token']` is set.
2024-02-20 17:51:26 +00:00
Bart Kalisz b8d2136aa2
[E2E] Setup block theme without opening browser (#44702) 2024-02-20 16:52:53 +01:00
nigeljamesstevenson 58d1f92e5f
Update stable tag to 8.6.1 (#44801)
woorelease: Update stable tag to 8.6.1
2024-02-20 15:47:50 +00:00
louwie17 79375d594c
Add/44643 variation empty state experiment (#44731)
* Update experiment name

* Add changelog
2024-02-20 12:41:43 -03:00
Vedanshu Jain 2535dd766e
Restore nonce and store notices after hydrating data from controllers. (#44790) 2024-02-20 16:39:36 +01:00
Bart Kalisz 82d1df5b37
[E2E] Stabilize a flaky Price Filter test (#44690) 2024-02-20 16:30:16 +01:00
Remi Corson 1cbc04449c
Introduce `<Notice>` component for WooCommerce Admin (#44620)
* Introduce Notice component

* minor alignment fix

* Fix MD title increment

* Fix readme lint

* add changelog entry

* fix CSS lints

* Small tweaks.

Regularising the spelling of isDismissible.
Using sanitizeHTML to sanitize the notice description.
Making the variant classes like &-success to make them a bit shorter.
Adjusting wording of README to convey that this component is designed for the marketplace, though it can be used elsewhere.
Tweaking whitespace in one place in the TSX to please the linter.

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

Co-authored-by: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>

* address feedback

* Changed notice classnames to use `__{$variant}` pattern as well. Restored 40px bottom margin to notices on viewports 600px and above. Added height 24px on icons to ensure they're nicely vertically centred.

---------

Co-authored-by: Remi Corson <1649788+corsonr@users.noreply.github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
Co-authored-by: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>
2024-02-20 14:52:41 +00:00
github-actions[bot] 267d53070c
Update changelog.txt from release 8.6.1 (#44803)
Prep trunk post release 8.6.1

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-20 15:50:38 +01:00
Alexandre Lara 319c2637eb
Reviews block: Convert editor-block.js to editor-block.tsx and replace propTypes with TypeScript definitions (#44594)
* Convert Reviews Editor code to TypeScript

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 10:58:52 -03:00
Gan Eng Chin de66873c33
Add `source` event props for `marketing_recommended_extension` track events to differentiate recommendations from woo.com API or default fallback data (#44714)
* Add getRecommendationSource util.

* Add `source` eventprop for `marketing_recommended_extension` track event.

* Make test pass with updated track event.

* Add tests for getRecommendationSource.

* Add JSDoc for getRecommendationSource.

* Better test descriptions.

* Add changelog.
2024-02-20 19:44:28 +08:00
Luigi Teschio 5fe5aef5a0
Product Image block: show the setting to control the imageSizing attribute and add the attribute to the `Product Catalog` and `Product Search Results` templates (#44691)
* add imageSizing attribute to the product catalog template

* add attribute for the product search results template

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 10:50:42 +01:00
Luigi Teschio 879cfaec46
[CYS- Core] Improve default palette (#44722)
* improve default palette

* improve comment

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

* improve comment

* fix theme.json

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 10:48:27 +01:00
Luigi Teschio 62f2782715
[CYS - Core] improve logic to find active fonts (#44724)
* improve logic to find active fonts

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

* Update changelog

* 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 <alba.rincon@automattic.com>
2024-02-20 10:48:09 +01:00
Albert Juhé Lluveras 484398cfe1
Open templates from list instead of loading the URL in block templates e2e tests (#44774)
* Open templates from list instead of loading the URL in block templates e2e tests

* Typo

* Clean up

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

* Make sure correct template is loaded

* Create a TemplateType type to avoid having to define it in several places

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-20 10:35:27 +01:00
RJ 7f01490fd7
fix: shipping tour should not show usps/dhl to non-us merchants (#44765)
* fix: shipping tour should not show usps/dhl to non-us merchants

* lint
2024-02-20 13:33:01 +08:00
Chi-Hsuan Huang 2f6818772e
Fix untranslated "Are you already selling somewhere else?" text in the product task list (#44763)
* Fix untranslated "Are you already selling somewhere else?" text in the product task list footer.

* Add changelog
2024-02-20 10:25:17 +08:00
Jorge A. Torres 0af71d5c48
Update contributors list with some missing core contributors (#44740)
* Add Proton to contributors list

* Add changelog
2024-02-19 15:57:34 -08:00
Alfredo Sumaran 0407569382
Apply Rector suggestions for PHP 8.1 (#41253)
* Apply Rector suggestions

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

* Apply feedback suggestions

* Add missing if

* Align assignments to satisfy the linter

* Move count call outside the loop to satisfy the linter

* Escape output to satisfy the linter

* Remove unnecessary assignment

* Remove unnecessary is_countable check

* Remove unnecessary array casting

* Restore variable name

* Update changelog entry

* change static to self for consistency
2024-02-19 12:29:16 -08:00
Karol Manijak 5b420159cb
Product Collection: disable "Sync with current query" option for 2nd+ block on archive (#44577)
* Refactor store usage

* Prepare function resolving inherit property for additional check

* Add logic to disable sync with query if there's already one Product Collection on archive that does that

* Add changelog

* Cover the post editor case

* Add E2E test for that and small refactor in tests

* Remove duplicated import

* Fix lint problems

* Fix typo in test description

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>

* Replace confusin abbreviation with other description

* Update the logic to be more robust and covering also the case where Product Collection blocks are nested

* Add issue reference to the comment

* Add eslint disable before ts-ignore

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-02-19 17:51:42 +01:00
Jonathan Lane 852e8f4c0e
Merchant coupon creation (#44671)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-02-19 16:43:53 +02:00
nigeljamesstevenson ff68feada0
Update test-assistant-release-highlight-tracker.yml 2024-02-19 13:58:05 +00:00
nigeljamesstevenson 8043b1962e
Create test-assistant-release-highlight-tracker.yml 2024-02-19 13:54:00 +00:00
nigeljamesstevenson 7699c52b9d
Update stable tag to 8.6.0 (#44662)
woorelease: Update stable tag to 8.6.0
2024-02-19 13:33:35 +00:00
Néstor Soriano 89c6fbbb7c
Add the Receipts Rendering Engine (#43502) 2024-02-19 12:03:46 +01:00
Chi-Hsuan Huang 0b55f4ee12
Add php unit watcher and update unit test docs (#44681)
* Add phpunit-watcher to automatically rerun PHPUnit tests when source code changes

* Update unit tests docs

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-19 16:40:29 +08:00
Karol Manijak 76f6b0097e
Product Collection: Improve flaky E2E test (#44687)
* Remove unnecessary waitForResponse making a test flaky

* Add changelog
2024-02-19 09:08:11 +01:00
Manish Menaria ce00f299ea
Improve Accessibility in Product Collection Navigation (#44599)
* Add animation for client-side pagination

This includes:
- Addition of animation state management in the frontend file to control the visual transition between pagination states.
- Introduction of new SCSS rules for the start and finish animations, ensuring a seamless and visually appealing pagination experience.
- Modification of the PHP logic to inject necessary HTML for the animation to be applied.

These updates aim to provide a more engaging and responsive interface for users navigating through product collection.

* Enhance accessibility for product collection navigation

This commit introduces several improvements to enhance accessibility and user experience. Specifically, it adds new context properties to manage accessibility messages during the navigation process, including messages for loading and when a page has loaded. These changes ensure that screen reader users receive appropriate feedback during navigation.

Changes made:
- Added `accessibilityMessage`, `accessibilityLoadingMessage`, and `accessibilityLoadedMessage` properties to the `ProductCollectionStoreContext`. These properties store messages to be announced by screen readers during different stages of page navigation.
- Implemented logic in the product collection store to update the `accessibilityMessage` during the start of navigation (showing a loading message) and upon completion (showing a loaded message).
- Utilized a technique to ensure that consecutive identical messages are still announced by screen readers, by appending a no-break space to the message if it is the same as the previous one. This follows a pattern similar to the `@wordpress/a11y` package.
- In `ProductCollection.php`, enhanced the block's HTML output to include these new accessibility messages and integrated them with the existing interactive data attributes. This ensures that the front-end components are fully prepared to handle these accessibility enhancements.
- Added a new `div` with `class="screen-reader-text"` and `aria-live="polite"` attributes, which dynamically displays the accessibility message based on the navigation state. This div complements the visual pagination animation with an accessibility-focused mechanism for announcing the page load states to screen reader users.

By addressing accessibility considerations with these enhancements, we're making Product Collection navigation more inclusive and user-friendly for all users.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-19 11:35:14 +05:30
Shiva Poudel a14c59b819
Fix - TGM Plugin activation calling undefined function wc_get_screen_ids (#44114)
Fixes an edge case where `WC_Admin_Notices::add_notices()` can be called, but the `wc_get_screen_ids()` function has not yet been defined.
2024-02-16 16:10:34 -08:00
Tarun Vijwani 4e6476a996
Adjust spacing in/between elements on the Cart and Checkout block pages (#44160)
* Add spacing in Checkout block page

* Add spacing in Order summary block

* Update responsive styles for order summary panel

* Update styles for cart and cart line items table

* Update styles for order summary and cross-sells products

* Remove unnecessary CSS styles from cart line items table and cart block

* Remove unused CSS class from cart line items table

* Fix linting errors

* Add changelog

* Fix changelog lint

* Update quantity selector style

* Increase the line-height of the set description and remove margin top from email field

* Add margin-top to order summary image and express payment margin adjustment

* Update styles for cart and checkout components

* Fix linting error

* Fix margin units in cart-cross-sells-products

* Replace em with px

* Add margin-top to payment method container

* Update styles for Cart block for mobile screen

* Update padding in cart style.scss
2024-02-17 01:50:11 +04:00
Moon 0bc6c37aa6
Add JSON schema files for remote spec validation (#44484)
* Add build scripts

* add schemas

* Add more schemas

* Update readme

* Add wc-pay-promotions schema

* Add composer version

* Update pnpm-lock.yaml

* Add changelog

* Fix markdown lint errors

* Fix markdown lint errors

* Add RemoteSpecValidator

* Update README

* Add fixture tests

* Add bundle names

* Remove Tests\\ from namespace

* Remove version from package.json

* Update packages/php/remote-specs-validation/tests/RemoteSpecValidatorTest.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update packages/php/remote-specs-validation/src/RemoteSpecValidator.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update packages/php/remote-specs-validation/tests/RemoteSpecValidatorTest.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update packages/php/remote-specs-validation/bin/build

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update packages/php/remote-specs-validation/README.md

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update lock file

* Fix markdown lint errors

* Revert package.json

* Update composer

* Use jetpack changelogger 3.3.0

* Update lock file with php 7.4

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-02-16 13:31:21 -08:00
github-actions[bot] 91fcab7008
Delete changelog files based on PR 44704 (#44730)
Delete changelog files for 44704

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 20:59:11 +00:00
github-actions[bot] 86f77c89ef
Delete changelog files based on PR 44698 (#44728)
Delete changelog files for 44698

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 20:48:50 +00:00
github-actions[bot] e736b62e95
Delete changelog files based on PR 44680 (#44720)
Delete changelog files for 44680

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 20:42:57 +00:00
Jonathan Lane 19b51c83e7
Tests for restricted coupon creation (#44716)
* Tests for restricted coupon creation

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-16 15:43:42 -04:00
Tarun Vijwani 7528a7d65e
Fix removal of express payment method from state (#44633)
* Fix removal of express payment method from state

- Correct the logic for removing an express payment method from the availableExpressPaymentMethods state object.
- Previously, the deletion targeted the incorrect object, leading to incorrect change in state. Now, the correct entry is removed using destructuring and rest parameters, ensuring the express payment method is properly deleted.

* Revert "Fix removal of express payment method from state"

This reverts commit 8e24553794.

* Fix typo error in the reducer

* Add unit to make sure correct express payment method is removed

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

* Remove payment method descriptions from express and fix changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-16 23:00:42 +04:00
github-actions[bot] ea50305d91
Delete changelog files based on PR 44676 (#44718)
Delete changelog files for 44676

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 18:29:45 +00:00
Fernando Marichal 587ba79350
Modify pre-publish texts after scheduling product (#44652)
* Modify prepublish texts after scheduling product

* Add changelog
2024-02-16 13:06:05 -03:00
Seghir Nadir e8a403b406
add default values for admin address filters (#44704)
* add default values for "woocommerce_admin_shipping_fields" and "woocommerce_admin_billing_fields" filters

* use null instead
2024-02-16 15:10:26 +00:00
Tom Cafferkey 5a761ae05e
Move condition to check post status before rendering product (#44698)
Co-authored-by: Leif Singer <git@singer.sh>
2024-02-16 14:15:48 +00:00
Alba Rincón 2d2d626c03
[CYS on Core] Update homepage templates intro patterns (#44616)
* Add bottom margin to the pattern

* Increase the height of the pattern to match designs

* Replace intro patterns on Core

* Add changelog

* Update the default intro to be hero product split
2024-02-16 14:59:16 +01:00
Bart Kalisz 711f420ef1
[E2E] Stabilize flaky Add to Cart test (#44639)
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-02-16 13:44:41 +00:00
Thomas Roberts 0d5c224520
Prevent script caching by using the WC core version to hash WC blocks assets instead of old WC Blocks version (#44676)
* use the WC core version to hash WC blocks assets

This is because the previous hash was generated using WC blocks version, which hasn't been updated since joining the monorepo.

* Make class variable to hold new prefixed wc version

* Add changelog

* Add var type to new class property

* Add prefix to prevent collission

* also use wc version for styles

* make variable public

---------

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2024-02-16 14:07:05 +01:00
Tarun Vijwani 506499dec4
Prevent prefilling of the billing address with the shipping address in the Checkout block for the Guest Shopper (#44347)
* Clear billing address when useShippingAsBilling checkbox is unchecked

* Add billing address sync with server

* Add useRef hook to store previous billing address and update sync functions

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

* Revert "Add useRef hook to store previous billing address and update sync functions"

This reverts commit 7bc3312ab7.

* Added condition to clear address only for guest users

* Add E2E test to check billing address form is empty for Guest shopper

* Fix typo

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

* Updated docs-manifest.json

* Revert "Updated docs-manifest.json"

This reverts commit 20d578a9d6.

* Include company field in the E2E test

* Replace beforeAll with beforeEach

* Skip country reset to keep consistency with Shortcode Checkout

* Remove sync billing address on server

* Update E2E test to include the shipping address check

* Remove unsed  imports

* Clear address fields except country and state

* Optimize the billing and shipping address check with switch statement

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-02-16 16:10:51 +04:00
Sam Seay 5ecea1b8c2
Support testing many variants of a block at runtime via dynamically generated templates (#44223) 2024-02-17 01:00:36 +13:00
Fernando Marichal cb967f6dfd
Change Visibility section label when a password is set (#44624)
* Change visibility section label

* Add changelog

* Fix changelog
2024-02-16 08:54:37 -03:00
github-actions[bot] d2e25b91b3
Update changelog.txt from release 8.6.0 (#44661)
Prep trunk post release 8.6.0

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-16 11:09:02 +00:00