Commit Graph

63056 Commits

Author SHA1 Message Date
Niels Lange a7383579be
Allow usage of block notice templates when using classic themes (#45164)
* Allow block notice templates in classic themes

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

* Fix e2e constants file

* Improve inline comments

* Add filter and enhance e2e tests

* Adjust test names

* Adress PHP lint errors

* Adress PHP lint errors

* Adress PHP lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 19:33:33 +07:00
RJ 59635fb4c8
add: update onboarding task list copies and illustrations (#44854) 2024-03-14 15:20:31 +08:00
Patrick Rauland 72f75edf58
Adding accessible markup to sale price. (#44413)
* Adding accessible markup to sale price. See #31099

This PR adds accessible markup to the sale price.

A user who only uses screen reader software can now hear and understand the original price as well as the current price.

This is important for accessibility.

Full issue: https://github.com/woocommerce/woocommerce/issues/31099

* Improving sale price string formatting & localization #31099

This PR merges in feedback from the WooCommerce team.

* Improving string translation & output. Giving RTL languages more customization with the price in the translatable string.
* Formatting regular price & sale price at the top and then inserting into the HTML below. This prevents some sloppy logic where you might print out a blank del or ins tag.

* Swapping esc_html & sprintf #31099

Reversed the esc_html() and sprintf(). This is intentional because if translations accidentally include some HTML, that could break things.

Also, stripping HTML tags in $formatted_regular_price so that the end result in the screen-reader-text span is just plain text.

* Adjusting white space #31099

Mostly removing white space for the lint checker

* Adding translator comments #31099

Adding translator comments for lint

* Add changelog

* Fix some PHPCS violations

* Fix unit tests

* Adjust E2E test

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-03-13 20:43:44 -03:00
Jorge A. Torres b3c328d4e4
[HPOS CLI] Add support for backfilling specific properties or metadata (#45171)
* `wc hpos diff` command enhancements

* Add support for partial backfills to LegacyDataHandler

* Add unit tests

* Add support for partial backfills to `wp wc hpos backfill` CLI tool

* Add changelog

* Augment update_order_from_object() with args parameter

* Implement update_order_from_object() for HPOS

* Simplify partial backfill logic in LegacyDataHandler

* Move prop name validation to legacy data handler

* Apply changes to order before passing to backfill functions

* Simplify update_order_from_object() in HPOS datastore

* Simplify order update from object across datastores

* Undo change

* Minor fix for CPT version (which only takes order differences into account)

* Improve readability around ‘woocommerce_orders_table_datastore_should_save_after_meta_change’ filter

* Commit docblock suggestion

* PHPCS fixes

* Enhance unit test
2024-03-13 19:29:49 -03:00
Maikel Perez 0fc75c5148
Remove Custom Fields for New Product Editor (#45493)
* Add remove custom field for the new product editor

* Add changelog file

* Show add button when the custom fields are empty

* Ensures to always convert the metas into a string array since it can be anything

* Add changelog file
2024-03-13 19:16:12 -03:00
Barry Hughes 3f1dbd5b13
Switch from "invoice" to "order details" in our emails. (#45395)
* Switch from "invoice" to "order details" in our emails.

* Revise default order details email subject text.

* Revise default order details header text.

* Bring E2E check up-to-date with latest text revision.

* Update API tests to match order detail email changes.

* Fix typo

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-03-13 19:34:39 +00:00
Roy Ho 5933945127
Bump woocommerce-sniffs to 1.0.0 for WPCS 3.0 support (#45533)
* Bump woocommerce-sniffs to 1.0.0 for WPCS 3.0 support

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 13:22:16 -03:00
jonathansadowski be787742e1
Add WCA config json to changes config for CI (#45524)
* Add json config files to ci changes config

* Add admin config to Woo plugin ci config

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 10:29:34 -05:00
Alba Rincón e8e2c5d554
Show the "Design your own" banner when editing a theme which is not TT4 (#45481)
* Show the "Design your own" banner when editing a theme which is not TT4

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

* Fix lint errors

* Pass the active theme to the context

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 14:55:04 +01:00
Nathan Silveira 8bef21dbc3
Add set_attribute method to Block class (#45523) 2024-03-13 10:13:02 -03:00
Tung Du 50beebe3e5
[Experimental] Display the formatted price in price filter text input fields (#45409)
* fix: display the formatted price in price filter text input fields

* chore: changelog

* Display formatted price within the Product Filter: Price input fields

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-03-13 09:47:36 -03:00
Veljko V 60aa614b98
Add E2E test for Merchant Checkout Block flow (#45449) 2024-03-13 14:28:21 +02:00
Paul Sealock 2f88da580f
Task List: Avoid fetching tasks on non-visible lists (#45498) 2024-03-13 23:18:17 +13:00
Ron Rennick 93c7ebfed4
exclude gglobalstep from community contributors automation (#45492)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-03-13 11:08:04 +02:00
Niels Lange 6b07ca44f5
Add totalValue filter (#45170)
* Add totalValue filter

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

* Remove nowrap to prevent text overflow

* Start docs for ‘totalValue’ filter

* Fix *.md lint issues

* Ignore .md lint errors for now

* Update code example and add screenshots

* Fix failing JS unit tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 00:42:24 +07:00
Fernando Marichal 55ec9eca2d
Add source property to legacy editor (#45515)
* Add source property to legacy editor

* Add changelog
2024-03-12 13:40:01 -03:00
Leif Singer a917efc44e
Add the ability to search for a currency by ISO code (#45512)
* Fix - #33503

Added ISO code along with the string. So it can be searched by using country code.

* Fixing linting issues

Added space with single quote to fix linting issue.

* fix linting issues

* add changelog file

* use emdash for separating data

* update test to new format

* include ISO code in settings test fixture

---------

Co-authored-by: daniyal.ahmad1992@gmail.com <daniyal.ahmad1992@gmail.com>
2024-03-12 17:32:32 +01:00
Fernando Marichal 1c068ce3a4
Update Attributes tooltip copy (#45485)
* Change attributes tooltip copy

* Add changelogs
2024-03-12 12:58:49 -03:00
Jacklyn Biggin 9f7e019d02
Fix character encoding issues across the docs site (#45518)
* Fix character encoding issues across the docs site

* Fix manifest
2024-03-12 11:06:37 -04:00
Brent MacKinnon 0e64d563cb
Fixing Character Encoding Issues in UX Payments Guidelines (#45482) 2024-03-12 10:14:48 -04:00
Luigi Teschio 10005111c6
CYS - reduce editor instance re-render (#45458)
* CYS - reduce editor instance re-render

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

* fix crash when currentTemplate is undefined

* fix ts error

* remove unused import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-12 15:05:12 +01:00
Leif Singer 15855b55a3
Add a filter `woocommerce_admin_terms_metabox_datalimit` to change the data-limit value for the attributes term box (#45506)
* Update html-product-attribute-inner.php

Add a new filter `woocommerce_admin_terms_metabox_datalimit` to change the value of data-limit. See #37548 for more context.

* Update html-product-attribute-inner.php

* Creating a changelog file again

* update @since tag

* tweak changelog file wording

---------

Co-authored-by: Saif H. Hassan <67080558+Babylon1999@users.noreply.github.com>
2024-03-12 13:22:48 +00:00
Maikel Perez 88f1187928
Add Custom Fields for New Product Editor (#45484)
* Create the Add new button

* Integrate the CreateModal with the CustomFields component to add fields

* Add validation utils

* Fix validation errors in the edit modal component

* Fix linter error

* Add changelog file
2024-03-12 10:02:24 -03:00
Leif Singer 28e7351180
Fix the `test_widget_renders_completed_task_count` unit test (#45509) 2024-03-12 12:22:38 +00:00
Sam Seay 4cd89e4beb
Blocks Playwright tests: Add tests for the new attribute filter block (#45333) 2024-03-13 00:15:05 +13:00
Patricia Hillebrandt 4933b86cc7
[CYS on core] Update the WooCommerce Extensions Themes page to include references to the CYS (#45468)
* Introduce the new 'Design your own' button in the themes screen.

* unify the SCSS margins

* Add double quotes for woocommerce-marketplace__sub-header

* Add the CYS banner to the marketplace.

* Ensure each child in a list should have a unique 'key' prop

* Update the NoAIBanner component to direct users to the CYS flow.

* Add the customizeStoreDesignUrl const

* Ditch navigateOrParent

* Add the 'Browse the WordPress.org theme directory to discover more' link.

* Ensure the warning Modal is displayed whenever the user clicks on the 'Design your own' button and their current active theme is not TT4

* Remove the unnecessary fragment

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

* Fix lint.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-12 11:03:08 +01:00
Sam Seay 0f98ffee64
Remove redundant dependency on moment in the csv-export package (#45410) 2024-03-12 17:06:53 +13:00
Paul Sealock 172bbac661
Remote Specs: Update endpoints to 2.0 (#45298) 2024-03-12 15:53:59 +13:00
Paul Sealock e16a644e86
Launch Your Store: Add useLaunchYourStore helper method (#45404) 2024-03-12 12:50:22 +13:00
Nathan Silveira 1ad84aa6fe
Allow using woocommerce icons for product details section description (#45348)
* Allow using woocommerce icons for product details section description and add gift icon

* Use core components for SVG
2024-03-11 20:30:31 -03:00
Paul Sealock ca2c12e667
Feature flags: Update config on watch (#45329) 2024-03-12 12:17:32 +13:00
Moon f061323d26
Tax task - Make postcode optional for countries without postcodes (#45367)
* Set field IDs

* Validate post code only when it is actually required

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

* Remove unused import

* Update test snapshot

* Update test snapshot

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 14:22:40 -07:00
Moon f901f60e4c
Update mercado pago payment copy (#45364)
* Update mercado copy

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 13:42:23 -07:00
Maikel Perez 277fa6b005
Edit Custom Fields for New Product Editor (#45396)
* Create edit modal

* Add update function to the useCustomFields hook

* Integrate the EditModal in the CustomFields component

* Add edition and validation logic to the custom field EditModal component

* Fix text control validation error styles

* Focus the name field when its invalid

* Fix linter error

* Fix edit modal min width and controls width

* Add changelog file

* Fix text overflow in custom fields table

* Remove non needed block style file
2024-03-11 15:28:51 -03:00
Christopher Allford 1e7b8c4004
Product Collection: Added `priceRange` PHPUnit Tests (#45363) 2024-03-11 10:15:09 -07:00
99w 0b6259edfd
Add filter to allow changing order stock reservation minutes (#45246) 2024-03-11 17:46:05 +01:00
Fernando Marichal 7cc4094f4a
Set product status after publishing (#45436)
* Set product status after publishing

* Refactor save

* Add changelog

* Remove comment

* Rename select alias
2024-03-11 12:25:08 -03:00
Matt Sherman 39306765d0
Tooltip: Fix max width of tooltip (used in Product Editor) (#45358)
* Set max width on tooltip

* Changelog
2024-03-11 11:04:54 -04:00
Maikel Perez 3658ac2d0e
List Custom Fields for New Product Editor (#45360)
* Create woocommerce/product-custom-fields block

* Register woocommerce/product-custom-fields block

* Add product-custom-fields block to the simple product template

* Create useCustomFields hook

* Create empty state

* Create CustomFields component

* Add custom fields table

* Add custom field remove button

* Hide the custom fields table base on the toggle value

* Remove non list features

* Add changelog files

* Fix linter errors

* Fix empty state styles

* Fix php linter error

* Remove context from the woocommerce/product-custom-fields-toggle-field block definition since it is not used

* Change url for the Read more about custom fields
2024-03-11 11:48:55 -03:00
Matt Sherman 99dec31578
Product Editor: Remove editable outline (#45366)
* Remove outline for the block when it is editable

* Refactor block-editor-block-list__block CSS

* Changelog
2024-03-11 10:41:33 -04:00
Maikel Perez 0a90499e7b
Custom Fields for New Product Editor (#45291)
* Register metaboxhidden_product user meta as a user rest field

* Create useMetaboxHiddenProduct to manage the user metaboxhidden_product meta field

* Create woocommerce/product-custom-fields-toggle-field block

* Register woocommerce/product-custom-fields-toggle-field block

* Create product-custom-fields feature flag

* Hide custom fields behind the product-custom-fields feature flag

* Add changelog files

* Get default postcustom user meta value when the metaboxhidden_product does not exist yet in the user object
2024-03-11 10:55:31 -03:00
Fernando Marichal fce3aeb90f
Close prepublish panel before creating new product (#45397)
* Close prepublish panel before create new

* Add changelog

* Remove close fn from blockeditor

* Close panel after clicking outside

* Refactor useEffect

* Remove empty lines

* Replace mousedown with click event

* Replace click with mouseup
2024-03-11 10:10:36 -03:00
Alba Rincón cb7e1c2eb5
[CYS] Fix the Opt-in modal buttons and checkbox styles (#45444)
* Fix the CYS Opt-in modal buttons and checkbox styles

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 12:30:47 +01:00
Tommy Ferry 7fe00de727
Add product archive header template and re-hook (#33681)
* Add product archive header template and re-hook

Moves the product taxonomy archive header into its own template file,
creates a related output function, and then re-hooks the new template
back into the archive-product.php file in the same place, via the
'woocommerce_before_main_content' hook, priority 40.

This is so that this template part can be removed/unhooked via the
'remove_action' function, which is a cleaner approach than template
overrides or additional style changes.

Resolves: #33672

* add product archive header template changelog

* bump template versions

* bump template versions correctly

* add a new hook in the archive-product.php template for the header template
2024-03-08 15:33:40 -06:00
Tung Du 8e200a35b7
[Experimental] Fix minor issues of new filter blocks (#45305)
* fix: make the dropdown hidden by default

* fix: price clause

* fix: variable name in attribute clause generator

* chore: changelog

* fix: flashing issue for dropdown has selected items
2024-03-08 17:00:49 -03:00
Vlad Olaru ebd54a7c59
Update/default payments gateways recommendations (#39635)
* Update default gateways recommendations

* Add changelog entry

* Add Airwallex where missing
2024-03-08 20:24:32 +01:00
Leif Singer ba4260a344
Add callback URL domain to auth screen (#45445)
* add callback URL domain to auth screen

* add changelog file

* bump template version

* tweak wording
2024-03-08 20:14:20 +01:00
Alexandre Lara b162c9fab0
[Experimental] Product Filter: Price (Beta) block: Prevent invalid price range selection in Product Filter Price block (#45403)
* Prevent invalid price range selection in Product Filter Price block

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 16:08:20 -03:00
Bhupesh Mishra 319408bb67
changed filter by attribute filter options order (#44799)
* changed filter by attribute filter options order

In filter by attribute, order of the filter conditions "ALL" and "ANY" reversed as requested.

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 13:45:53 +01:00
Néstor Soriano 0432a8fd88
Add the plugin install engine (#44856)
* Add the PluginInstaller class

* Add changelog file

* Fix linting issues

* Changes in the installer:

- Allow installS from the WordPress.org directory only
- If the installer name is WooCommerce, throw if the caller is not
  in 'includes' or 'src' in WooCommerce core
- Remove two unnecessary includes
- Check if WP plugin upgrader classes already exist before
  executing the includes for them
- Get the installed plugin info using the plugin_info method
  of the plugin upgrader class

* Remove the get_installed_plugin_info method as it's no longer used

* Log plugin install only on sites with WooCommerce active
2024-03-08 07:29:41 -05:00