Commit Graph

19273 Commits

Author SHA1 Message Date
Jonathan Lane eec6b7e7aa
A number of e2e test improvements based on flaky test tracking (#41768) 2023-11-29 17:00:03 -08:00
Darren Ethier 25008b6361 Update close-stale-issues.yml workflow to update stale label. 2023-11-29 15:55:47 -05:00
Jason Kytros b1ac7300c7 Remove unused ) 2023-11-29 17:45:14 +02:00
Justin Palmer 2eecbb715d
Set since tags to 8.5.0 2023-11-29 16:44:24 +01:00
Corey McKrill 9a947c1a06
Logging: Implement "search within log files" (#41353)
* Normalize render method names

* Refactor get_query_params to allow key filtering

* Scaffold the search results view

* Add missing unslash

* First pass at functional search

* Fix memory leak and recursive highlighting

* Fix various search string edge cases

* Move match highlighting to format_match method

* Tweak match line formatting

* Rename ListTable to FileListTable

* Switch search results view to a list table

* Add notice about max files for search

* Remove unused function

* Only use monospace font on the matched line part of search results

* Add notice about search result limit

* Fix font in table header

* phpcs cleanup

* Remove unnecessary search form action

* Add caching to search results

* Add unit test for search method

* Caching improvements

* phpcs cleanup

* Add unit test for close_stream

* Remove unneeded linting exception

* Add changelog file

* Remove unnecessary usage of get_class()

* Make sure file stream gets closed when we break the loop early

* Make the returned results an even 200 when hitting the limit
2023-11-29 14:52:37 +00:00
Niels Lange e1efae2fe2 Improve readability of order note (https://github.com/woocommerce/woocommerce-blocks/pull/11944) 2023-11-29 21:39:07 +07:00
Jason Kytros f16061e4fe Add space 2023-11-29 16:08:00 +02:00
Jason Kytros aaf4e090a6 Prettier fixes 2023-11-29 15:03:16 +02:00
github-actions fdaa33b4f1 Add changefile(s) from automation for the following project(s): woocommerce 2023-11-29 12:46:10 +00:00
Jason Kytros 220a5b2e9b Remove Subscriptions from the Add Product task list 2023-11-29 14:40:21 +02:00
Thomas Roberts 66cc2bd9e8 Move checkout terms & conditions/privacy policy tests (https://github.com/woocommerce/woocommerce-blocks/pull/11973) 2023-11-29 04:16:44 -08:00
Leif Singer 1e4b25e9eb
Downloadable Product Permissions: The text "-1" is rendered every time merchants click the "Grant access" button without entering any product (#41682) 2023-11-29 11:42:22 +01:00
Albert Juhé Lluveras a8c44eb4c7 Reviews by Product: fix reviews count not appearing in product selector (https://github.com/woocommerce/woocommerce-blocks/pull/11976) 2023-11-29 11:13:18 +01:00
Sam Seay 5f7836183b Adjust the store config for Dropdown to keep selectors in state portion. (https://github.com/woocommerce/woocommerce-blocks/pull/11968) 2023-11-29 18:27:59 +13:00
Sam Seay dea8b734a6 Migrate attribute-filter block to use new interactivity store API (https://github.com/woocommerce/woocommerce-blocks/pull/11911) 2023-11-29 18:27:38 +13:00
Sam Seay 58c6339ac9 Update interactivity price filter block to use latest Interactivity Store API (https://github.com/woocommerce/woocommerce-blocks/pull/11943) 2023-11-29 17:04:35 +13:00
Maikel David Pérez Gómez 92eac565e5
[Grouped products] Product list (#41653)
* When the user selects a grouped product type, we show an additional Products in this group section in the General tab.

* When the user selects a grouped product type, we hide the Pricing and Shipping tabs.

* When empty, the grouped products card has an empty state with an illustration

* When the user clicks Add products, we show a modal

* When the user clicks the search field, we immediately display the list of all existing products. It is sorted alphabetically. Clicking an item closes the search and adds the product to the list.

* Add remove button to the product list

* When the user clicks Add, we close the modal and display the list of added products in the product form

* Clicking the product name will open it in the editing view in a new tab

* Clicking the arrow button will open the product's page in a new tab

* Prevent adding already added products

* If the name or SKU extends beyond this width, we truncate the text

* Add changelog files

* Fix linter errors
2023-11-28 22:21:17 -03:00
Thomas Roberts a652fa18f8 Move the Checkout -> Account tests from puppeteer to Playwright (https://github.com/woocommerce/woocommerce-blocks/pull/11961) 2023-11-28 23:16:25 +04:00
Justin Palmer 18ffb2fac0
Restore missing prefix to fix check 2023-11-28 19:09:26 +01:00
github-actions da46d5fb3b Add changefile(s) from automation for the following project(s): woocommerce 2023-11-28 16:35:48 +00:00
Paulo Arromba 6df0754b2a
Update WooCommerce Blocks to 11.6.1 (#41743)
* Updated woocommerce/woocommerce-blocks to 11.6.1

* Updated content-hash on composer.lock
2023-11-28 14:57:28 +00:00
Thomas Roberts d32be3f47b Migrate cart/checkout tax tests to Playwright (https://github.com/woocommerce/woocommerce-blocks/pull/11954) 2023-11-28 21:00:40 +07:00
Leif Singer f408296b79
Email the site admin when a payment gateway is enabled (#41645) 2023-11-28 14:29:34 +01:00
Leif Singer 2a12fea81d simplify conditional 2023-11-28 13:04:09 +01:00
Leif Singer 7f839980ec add admin email address before removing duplicates 2023-11-28 13:02:49 +01:00
Albert Juhé Lluveras a0715be413
Add several WooCommerce-related commands to the Command Palette (#41605)
* add simple initial integration with Command Palette

* Add WooCommerce commands

* Add e2e tests

* Fixes

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

* Avoid using page.waitForLoadState() in Command Palette tests

* Make Settings and Analytics commands dynamic

* Decode entities to make sure characters are displayed correctly in the command palette

* Move decodeEntities() into registerCommandWithTracking()

---------

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: github-actions <github-actions@github.com>
2023-11-28 12:26:30 +01:00
Alba Rincón 0d84dca852 Tweak the product prompt (https://github.com/woocommerce/woocommerce-blocks/pull/11903)
* Tweak the product prompt

To avoid creating products that are things that cannot be sold in stores (forests, people, etc.)

* Return error when images are not provided
2023-11-28 09:06:29 +01:00
Alba Rincón 175554eb97 [Store Customization] Update product slug when updating the title and flush cache (https://github.com/woocommerce/woocommerce-blocks/pull/11952)
* Check permalink and flush cache if not found

* Update the product slug with the new title

* Use wp_update_post to update the product

* Remove unused method
2023-11-28 08:55:19 +01:00
Karol Manijak 6a397d65f9 Remove unused Add to Cart product element (https://github.com/woocommerce/woocommerce-blocks/pull/11948)
* Remove unused Add to Cart product element

* Remove entry about Product Add to Cart product element from MD file
2023-11-28 08:34:12 +01:00
Karol Manijak 2ab440b806 Reorganise Columns controls and fix undefined problem in Product Collection settings (https://github.com/woocommerce/woocommerce-blocks/pull/11937)
* Reorganise Columns controls and fix undefined problem in Product Collection settings

* Remove type condition in hasValue of Columns control

* Adjust the E2E tests locator to new changes
2023-11-28 08:33:31 +01:00
Niels Lange 5f0c4726a8 Investigate E2E CI caching issue (https://github.com/woocommerce/woocommerce-blocks/pull/11874)
* Try env:restart instead of env:start

* Change env:restart to env:start again

* Try env:restart instead of env:start

* Change env:restart to env:start again

* Adjust heading level of cart and checkout template

* Replace button selector with label selector

* Try env:restart instead of env:start

* Change env:restart to env:start again

* Ensure to close welcome guide modal

* Adjust heading level of default template content

* Try env:restart instead of env:start

* Change env:restart to env:start again

* Try env:restart instead of env:start

* Change env:restart to env:start again

* Address existing TS issues

* View template in edit mode

* Keep certain tests skipped

* Fix broken tests after addressing TS issues
2023-11-28 14:16:45 +07:00
Roy Ho 58c130af79 Remove unneeded block type check (https://github.com/woocommerce/woocommerce-blocks/pull/11964) 2023-11-27 13:11:51 -08:00
Tomek Wytrębowicz 19bb2a37a3
Reduce `wc_order_attribution` module API
make `initOrderTracking` and `removeTrackingCookies` methods private,as per YAGNI.
Add some more code comments
2023-11-27 18:59:24 +01:00
Justin Palmer 73dd7819c4
A few naming fixes 2023-11-27 18:59:24 +01:00
Tomek Wytrębowicz c28b0a9282
Move `??` operator from `get_source_values` back to `get_unprefixed_fields`
because `$_POST` may not include all these values.

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2023-11-27 18:59:23 +01:00
Tomek Wytrębowicz 55b3ab1ec5
Update classic checkout selector
Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2023-11-27 18:59:23 +01:00
Tomek Wytrębowicz 0f8933e591
Remove unnecesary import
Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2023-11-27 18:59:23 +01:00
Tomek Wytrębowicz 59d0275348
Fix PHPCS
Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2023-11-27 18:59:23 +01:00
Tomek Wytrębowicz c95b94aa14
fix PHPCS 2023-11-27 18:59:23 +01:00
Tomek Wytrębowicz 6704a6426b
Do the classic checkout OSA bindings only on the classic page
Call `previousInitCheckout` only if there is one.
2023-11-27 18:59:22 +01:00
Tomek Wytrębowicz cb4dd6e592
Blanket Order Source Attribution → Order Attribution for blocks
Propagate chenges from c9c2a05ca5 to the Block-related classes
2023-11-27 18:59:22 +01:00
Justin Palmer 4662cae7b7
Blanket Order Source Attribution → Order Attribution change 2023-11-27 18:59:22 +01:00
Justin Palmer b62bf69f60
Clearer changelog 2023-11-27 18:59:22 +01:00
Justin Palmer 497bc3047d
Fix array assignment spacing 2023-11-27 18:59:22 +01:00
Justin Palmer cfa5728738
Remove Beta notice about auto-enabled feature 2023-11-27 18:59:22 +01:00
Justin Palmer 41421c1644
Include customer order count in order tracks 2023-11-27 18:59:21 +01:00
Justin Palmer 3e905dd6ea
Lowercase device in order tracks for consistency across values 2023-11-27 18:59:21 +01:00
Justin Palmer 4acd06245f
Expand order tracks datapoints 2023-11-27 18:59:21 +01:00
Tomek Wytrębowicz b52964651b
Remove code comments related to AssetsAPI
Addresses https://github.com/woocommerce/woocommerce/pull/41592#discussion_r1402021606
2023-11-27 18:59:21 +01:00
Tomek Wytrębowicz 6afe26df59
Simplify `woocommerce_order_save_attribution_source_data` logic 2023-11-27 18:59:21 +01:00
Tomek Wytrębowicz 709ec75a3c
Remove unrelevant code comment
Addresses https://github.com/woocommerce/woocommerce/pull/41592#discussion_r1402411581
2023-11-27 18:59:20 +01:00
Tomek Wytrębowicz 6de4bd3ec3
Fix PHPCS 2023-11-27 18:59:20 +01:00
Tomek Wytrębowicz 3c1aa076d7
Remove not needed `is_wccom_cookie_terms_available`
Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2023-11-27 18:59:20 +01:00
Tomek Wytrębowicz dd66ba0d39
Remove jQuery dependency from the checkout frontend 2023-11-27 18:59:20 +01:00
Tomek Wytrębowicz 58f703211c
Fix translation context and PHPCS 2023-11-27 18:59:20 +01:00
Tomek Wytrębowicz c2b74a6021
Save OSA proerties on Blocks checkout
using the same method we use for the classic checkout.

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2023-11-27 18:59:20 +01:00
Tomek Wytrębowicz 24b526266b
Prefix and flatten OSA properties for the Blocks checkout 2023-11-27 18:59:19 +01:00
Tomek Wytrębowicz e91d0325ae
Unify OSA script handles
Stick to `wc-` convention instead of `woocommerce-`.
Do not add a superflous `-js` suffix`
2023-11-27 18:59:19 +01:00
Tomek Wytrębowicz 5b16a8abdb
Fix OSA.js dependency ids and checkout extension prefix 2023-11-27 18:59:19 +01:00
Tomek Wytrębowicz 8347e7108c
Move changes from blocks repo PR
https://github.com/woocommerce/woocommerce-blocks/pull/11506
Co-authored-by: Jeremy Pry <jeremy.pry@gmail.com>
2023-11-27 18:59:19 +01:00
Tomek Wytrębowicz 2b5f817169
Move changes from blocks repo PR
https://github.com/woocommerce/woocommerce-blocks/pull/11506
Co-authored-by: Jeremy Pry <jeremy.pry@gmail.com>
2023-11-27 18:59:19 +01:00
Justin Palmer 07312708d1
Include Origin column for non-HPOS orders table 2023-11-27 18:59:19 +01:00
Justin Palmer 79fed9cac9
Don't link orders in customer history by email if customer_id differs 2023-11-27 18:59:18 +01:00
Justin Palmer 175f424101
PHPCS fix 2023-11-27 18:59:18 +01:00
Justin Palmer 418eb7b128
Remove WCCOM attribution source integration 2023-11-27 18:59:18 +01:00
Tomek Wytrębowicz ad1fcbb453
Simplify `.closest` usage in OSA-admin.js 2023-11-27 18:59:18 +01:00
Tomek Wytrębowicz c00acce374
Remove jQuery dependency from sourcebuster-js 2023-11-27 18:59:18 +01:00
Tomek Wytrębowicz 52318b4de7
Use single public namespace for OSA JS 2023-11-27 18:59:17 +01:00
Justin Palmer ceb354e456
Enqueue Sourcebuster script from new location 2023-11-27 18:59:17 +01:00
Justin Palmer 78d42b2e72
Use Woo-forked Sourcebuster-JS package 2023-11-27 18:59:17 +01:00
Dima 84f0deba96
Fixing phpcs errors. 2023-11-27 18:59:17 +01:00
Dima 9d8b93c074
Fixing phpcs errors. 2023-11-27 18:59:17 +01:00
Dima f789cc26b0
Adding few more unit tests plus adjusting tracking controller to be able to test the exact functions set to filters and actions. 2023-11-27 18:59:17 +01:00
Dima b22519d7de
Adding AbstractInterfaceServiceProvider unit test and test supplies. 2023-11-27 18:59:16 +01:00
Justin Palmer 373af383de
Include hide/show text in detail toggle and reverse carets 2023-11-27 18:59:16 +01:00
Justin Palmer 7a91703438
Better details toggle styling and behavior 2023-11-27 18:59:16 +01:00
Justin Palmer 18d328846a
Updated customer history logic (billing email + better totals)
- Uses billing_email if no customer_id is provided
- Accounts for refunds and multiple types of order status
2023-11-27 18:59:16 +01:00
Justin Palmer 9a893c8af4
Clarify customer history tooltip wording a little bit 2023-11-27 18:59:16 +01:00
Justin Palmer 727ebe3e1b
Better details toggle alignment 2023-11-27 18:59:15 +01:00
Justin Palmer 8ed2ead224
Fix title casing in Customer history metabox 2023-11-27 18:59:15 +01:00
Justin Palmer 199158e525
Remove unused import 2023-11-27 18:59:15 +01:00
Justin Palmer 3ceb27ad21
Fix broken details toggle with `e.target`
- instead of `this` (arrow function)
2023-11-27 18:59:15 +01:00
Justin Palmer 49dff0eb9c
Remove customer source data from user admin pages
The source data will still be collected display in a future udpate
2023-11-27 18:59:15 +01:00
Justin Palmer 7fe4825fe7
Add documentation to the modified sourcebusterjs file 2023-11-27 18:59:14 +01:00
Justin Palmer 8253beafe9
Update docs for AbstractServiceProvider and AbstractInterfaceServiceProvider 2023-11-27 18:59:14 +01:00
Justin Palmer 6f911ca91c
Revert "Include sourcebuster as npm package"
Restores the customized version of sourcebuster 1.0.5
This reverts commit 096dc95c1c52d62cfc2f2bd30a2cdd2bbcf7f536.
2023-11-27 18:59:14 +01:00
Justin Palmer 9ad289cea3
Include sourcebuster as npm package 2023-11-27 18:59:14 +01:00
Justin Palmer 7f100ac88a
Clarify nonce verification ignores 2023-11-27 18:59:14 +01:00
Justin Palmer dd629741f5
Use OrderUtil to check for HPOS enabled 2023-11-27 18:59:13 +01:00
Justin Palmer 00022754e9
Remove `$theorder` manipulation 2023-11-27 18:59:13 +01:00
Justin Palmer 7a97054bb3
PHPCS fix 2023-11-27 18:59:13 +01:00
Justin Palmer 2b6d92e786
Remove leftover VersionUtil class 2023-11-27 18:59:13 +01:00
Justin Palmer eb6aee13ed
Escape wc_help_tip output 2023-11-27 18:59:13 +01:00
Justin Palmer 88318c9df2
Remove phpcs disable directive 2023-11-27 18:59:13 +01:00
Justin Palmer 196ba5a7ba
Escape wc_price output better 2023-11-27 18:59:12 +01:00
Justin Palmer c9bea33598
Escape wc_help_tip output 2023-11-27 18:59:12 +01:00
Justin Palmer f64e4a5100
Escape wc_price output 2023-11-27 18:59:12 +01:00
Justin Palmer 7c1d6b6d7c
Only display attribution meta boxes for valid orders 2023-11-27 18:59:12 +01:00
Justin Palmer c4ec613277
Clarify tracking consent and cookie management 2023-11-27 18:59:12 +01:00
Justin Palmer 602d1f2ba5
Clarify callback purpose and function 2023-11-27 18:59:12 +01:00
Justin Palmer f6f7b054e9
Remove PHPCS disable directive 2023-11-27 18:59:11 +01:00
Justin Palmer c095f9e1ce
Remove PHPCS disable directive 2023-11-27 18:59:11 +01:00
Justin Palmer d7a31e9a79
Clarify Order Source Attribution is_legacy flag being true 2023-11-27 18:59:11 +01:00
Justin Palmer d1c5af74c0
Remove extra line in PHPCS config 2023-11-27 18:59:11 +01:00
Justin Palmer 222cb6d776
Fixed test namespace
Co-authored-by: Leif Singer <leif@automattic.com>
2023-11-27 18:59:11 +01:00
Justin Palmer 05e4698af7
Better constant variable name 2023-11-27 18:59:11 +01:00
Justin Palmer cf8add7188
Const instead of let
Co-authored-by: Leif Singer <leif@automattic.com>
2023-11-27 18:59:10 +01:00
Justin Palmer 977863eacf
Remove superfluous comment
Co-authored-by: Leif Singer <leif@automattic.com>
2023-11-27 18:59:10 +01:00
Justin Palmer 23f4094ac0
Remove double newline
Co-authored-by: Leif Singer <leif@automattic.com>
2023-11-27 18:59:10 +01:00
Justin Palmer d60fe00308
Capitalize Tracks in comment
Co-authored-by: Leif Singer <leif@automattic.com>
2023-11-27 18:59:10 +01:00
Justin Palmer 378e4999e5
Clearer comment
Co-authored-by: Leif Singer <leif@automattic.com>
2023-11-27 18:59:10 +01:00
Justin Palmer df2e05e4cf
Re-add "mobiledetect/mobiledetectlib" library 2023-11-27 18:59:10 +01:00
Justin Palmer dfcaa6019d
Fix PHPCS errors in test files 2023-11-27 18:59:09 +01:00
Justin Palmer 527f51414d
Don't disable PHPCS rules 2023-11-27 18:59:09 +01:00
Justin Palmer 10b1af773c
Remove unnecessary PHPCS exclusions 2023-11-27 18:59:09 +01:00
Jeremy Pry cb116ddade
Limit registration during install, and move origin column to admin_init 2023-11-27 18:59:09 +01:00
Jeremy Pry ee93cacdd8
Add docblock to the woocommerce_order_save_attribution_source_data hook 2023-11-27 18:59:09 +01:00
Jeremy Pry ae99921667
Fix typo in class name 2023-11-27 18:59:09 +01:00
Jeremy Pry d6875fac14
Use an action to save the attribution data. 2023-11-27 18:59:08 +01:00
Jeremy Pry 4f305cc9cf
Add public get_*() methods 2023-11-27 18:59:08 +01:00
Jeremy Pry f6e8a586aa
Cleanup @ since tags 2023-11-27 18:59:08 +01:00
Jeremy Pry 2dd3cc6176
Remove period from the end of the feature description 2023-11-27 18:59:08 +01:00
Jeremy Pry de88fd19a7
Fix typos in comments 2023-11-27 18:59:08 +01:00
Jeremy Pry 62d05d9ab8
Make adjustments to JS files
- Use arrow functions
- Consistent use of let or const over var
- Clean up spacing and formatting
2023-11-27 18:59:08 +01:00
Jeremy Pry 3dafdb482d
Return early when there's already an order object. 2023-11-27 18:59:07 +01:00
Jeremy Pry 5effcb7a82
Handle orgin column registration for HPOS compatibility 2023-11-27 18:59:07 +01:00
Jeremy Pry ab92fa13ff
Mark not experimental, and update description 2023-11-27 18:59:07 +01:00
Jeremy Pry 15c7263ba6
PHPCS adjustments for test files 2023-11-27 18:59:07 +01:00
Jeremy Pry 5cba1a762d
Update MobileDetect library
For now, this manually adds the mobile detect library, due to an error that should be fixed by https://github.com/serbanghita/Mobile-Detect/pull/944.
2023-11-27 18:59:07 +01:00
Jeremy Pry eabda2b61e
Fix PHPCS errors and warnings 2023-11-27 18:59:07 +01:00
Jeremy Pry 5c82baef5b
Correct file/class name and PHPCS fixes 2023-11-27 18:59:07 +01:00
Jeremy Pry 7553579032
Use wc_get_template() for the template files 2023-11-27 18:59:06 +01:00
Jeremy Pry 0cb181bd9f
Add is_script_debug_enabled() method to the ScriptDebug trait 2023-11-27 18:59:06 +01:00
Jeremy Pry cbf0da970a
Create VersionUtil class 2023-11-27 18:59:06 +01:00
Jeremy Pry 8997db5f98
Add actual version to the template files 2023-11-27 18:59:06 +01:00
Jeremy Pry aeff5b1b82
Update source value processing to accept an array
This allows more flexibility in where the array of values to process originates, without this method explicitly relying on the $_POST super-global.
2023-11-27 18:59:06 +01:00
Jeremy Pry 228e5534b8
Remove get_source_label() method and add filters 2023-11-27 18:59:06 +01:00
Jeremy Pry 15d7a0ad48
Use Jetpack Constant utility class
This matches with the rest of WooCommerce technique.
2023-11-27 18:59:05 +01:00
Jeremy Pry 735da31595
Refactor device detection to a separate method 2023-11-27 18:59:05 +01:00
Jeremy Pry 2058928229
Use class directly instead of mocked 2023-11-27 18:59:05 +01:00
Jeremy Pry 3cee48143a
Move SourceAttribution test to correct location 2023-11-27 18:59:05 +01:00
Jeremy Pry 67c7f198b4
Make the on_plugins_loaded function protected 2023-11-27 18:59:05 +01:00
Jeremy Pry df0f6a6fd3
Update Consent API test to use closures 2023-11-27 18:59:05 +01:00
Jeremy Pry f8a24b6819
Add file headers to the new templates 2023-11-27 18:59:04 +01:00
Jeremy Pry 67e40fcc68
Mock FeaturesController class for WCCOM test 2023-11-27 18:59:04 +01:00
Jeremy Pry 2ef7df465a
Add tracks using JS 2023-11-27 18:59:04 +01:00
Jeremy Pry edfe2896b4
Add Tracks event with source data 2023-11-27 18:59:04 +01:00
Jeremy Pry b787271c86
Refactor source processing 2023-11-27 18:59:04 +01:00
Jeremy Pry 8e382813c0
Remove experimental feature flag 2023-11-27 18:59:04 +01:00
Jeremy Pry d62bbce217
Add unit tests for Order Source Attribution 2023-11-27 18:59:03 +01:00
Jeremy Pry fa2421758d
Add consent API integration 2023-11-27 18:59:03 +01:00
Jeremy Pry 22c82c485a
Add WCCom tracking controller 2023-11-27 18:59:03 +01:00
Jeremy Pry a21c1cb13a
Create separate service provider for Order Attribution 2023-11-27 18:59:03 +01:00
Jeremy Pry d8d57f3c31
Ensure the Attribution controller is limited by the feature being enabled 2023-11-27 18:59:03 +01:00
Jeremy Pry a2c2c82310
Create method for setting the fields and prefix. 2023-11-27 18:59:03 +01:00
Jeremy Pry 0da5aff8dd
Create ScriptDebug trait 2023-11-27 18:59:02 +01:00
Jeremy Pry 892ef3435a
Add changelog file 2023-11-27 18:59:02 +01:00
Jeremy Pry 95001377b6
Add auto registration using the interface 2023-11-27 18:59:02 +01:00
Jeremy Pry 87b11e3bbb
Include the get_hpos_order_object() method and PHPCS fixes 2023-11-27 18:59:02 +01:00
Jeremy Pry b01737d969
Add the SourceAttributionController class to the service provider 2023-11-27 18:59:02 +01:00
Jeremy Pry 22f1e67d7a
Update get() method to match docblock
This could return an object, or an array of objects.
2023-11-27 18:59:02 +01:00
Jeremy Pry 2c689ee858
Add abstract provider for tagging interfaces 2023-11-27 18:59:01 +01:00
Jeremy Pry f03821904b
Create an interface for classes that need to register hooks 2023-11-27 18:59:01 +01:00
Jeremy Pry fa0c4782a7
Add scripts and styles for order source attribution 2023-11-27 18:59:01 +01:00
Jeremy Pry d9152b01f6
Add initial source attribution files 2023-11-27 18:59:01 +01:00
Jeremy Pry 630f265058
Add "mobiledetect/mobiledetectlib" library 2023-11-27 18:59:01 +01:00
Jeremy Pry ef61216099
Add Customer History metabox 2023-11-27 18:59:01 +01:00
Jeremy Pry 1036b8970d
Add Order Source Attribution feature setting. 2023-11-27 18:59:00 +01:00
Raluca Stan 5578a541d4 Update extensibility doc (https://github.com/woocommerce/woocommerce-blocks/pull/11924)
* Update extensibility doc 

This PR adds a missing link to the Extensibility page for a new doc that was added about the migrated hood.

* Update docs/third-party-developers/extensibility/README.md

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>

---------

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
2023-11-27 18:25:51 +01:00
Leif Singer 5aa6f29b85 fix typo 2023-11-27 16:09:14 +01:00
Leif Singer 5469dd3f01 ensure the WC_Payment_Gateways instance we're testing is isolated from the other unit tests 2023-11-27 16:09:14 +01:00
Leif Singer d64603764a extend test setup 2023-11-27 16:09:14 +01:00
Leif Singer 21ad8d547f move the test to the proper file 2023-11-27 16:09:14 +01:00
Leif Singer 3850a07a2c add a test that ensures the email and log message get generated 2023-11-27 16:09:14 +01:00
Leif Singer 5a3ba9a0cb appease the linter 2023-11-27 16:09:14 +01:00
Leif Singer d638cc44a9 tweak email subject 2023-11-27 16:09:14 +01:00
Leif Singer 488084d7ce use the gateway ID to make gateway_settings_url a direct link to the enabled gateway's settings page 2023-11-27 16:09:14 +01:00
Leif Singer d6f1adb4cf pass the gateway instance into the wc_payment_gateway_enabled_notification_email_addresses hook 2023-11-27 16:09:14 +01:00
Leif Singer ee04b60a83 pass the whole gateway instance into notify_admin_payment_gateway_enabled 2023-11-27 16:09:14 +01:00
Leif Singer e3c2c79389 make on_payment_gateways_initialized private 2023-11-27 16:09:14 +01:00
Leif Singer bbdbb026ea pass WC_Payment_Gateways instance to wc_payment_gateways_initialized hook 2023-11-27 16:09:14 +01:00
Leif Singer 665a6ce721 once more, appease the linter 2023-11-27 16:09:14 +01:00
Leif Singer 86fa398d5a allow adding email addresses to the notification via a filter 2023-11-27 16:09:14 +01:00
Leif Singer e23839294f guard against unset array key 2023-11-27 16:09:14 +01:00
Leif Singer 26b664f29f add logging 2023-11-27 16:09:14 +01:00
Leif Singer 20cd022334 document all the things 2023-11-27 16:09:14 +01:00
Leif Singer 3cd4b5078c appease the linter 2023-11-27 16:09:14 +01:00
Leif Singer 6b12ffb5f5 use AccessiblePrivateMethods, a single callback for both added and updated options, and subscribe to gateway-specific hooks 2023-11-27 16:09:14 +01:00
Leif Singer 7254e99ec8 move things into the WC_Payment_Gateways class 2023-11-27 16:09:14 +01:00
Leif Singer a0304bedef ensure gateway title is set 2023-11-27 16:09:14 +01:00
Leif Singer d1fc46e658 cover both update_option and add_option 2023-11-27 16:09:14 +01:00
Leif Singer 7faf9b9f3b indent assignments correctly 2023-11-27 16:09:14 +01:00
Leif Singer 71ec30268a use proper sprintf for placeholders 2023-11-27 16:09:14 +01:00
Leif Singer 247bf534e3 optimize the checks a bit 2023-11-27 16:09:14 +01:00
Leif Singer 82f1bddaa5 add changelog file 2023-11-27 16:09:14 +01:00
Leif Singer e4c6d9a532 invert the conditional so we can remove the nesting and go for an early return instead 2023-11-27 16:09:14 +01:00
Leif Singer 7bda29426b ensure the value key is set 2023-11-27 16:09:14 +01:00
Leif Singer 3352891794 ensure the option values are arrays 2023-11-27 16:09:14 +01:00
Leif Singer 81e7fce52a appease the linter 2023-11-27 16:09:14 +01:00
Leif Singer 79831e0bbf Email the site admin when a payment gateway is enabled 2023-11-27 16:09:14 +01:00
Mike Jolley 4a13e5faf0 Switch to NoticeBanner component inside Store Notices Block placeholder (https://github.com/woocommerce/woocommerce-blocks/pull/11920) 2023-11-27 13:43:42 +00:00
nigeljamesstevenson cb43ae8bc1 Merge branch 'update/e2e-skip-flaky-test-downloads-revenue-report-as-CSV' of github.com:woocommerce/woocommerce into update/e2e-skip-flaky-test-downloads-revenue-report-as-CSV 2023-11-27 13:36:20 +00:00
nigeljamesstevenson f8928ecc85 skip newly added tests as they appeas to be flaky 2023-11-27 13:35:58 +00:00
Agung Sundoro 7e77a13f16 fix: store notices always shows as an error type woocommerce/woocommerce-blocks#11768 (https://github.com/woocommerce/woocommerce-blocks/pull/11932) 2023-11-27 05:07:18 -08:00
Arsany Benyamine fa1f2896fb replace Stories root Dir to "External Components" (https://github.com/woocommerce/woocommerce-blocks/pull/11910) 2023-11-27 04:14:58 -08:00
github-actions 2af871747e Add changefile(s) from automation for the following project(s): woocommerce 2023-11-27 11:53:24 +00:00
nigeljamesstevenson 2896a4a4bd skip newly added test as appears to be flaky 2023-11-27 11:47:45 +00:00
Alba Rincón 1c325c3ea9 Convert to tsx and replace proptypes by ts definitions (https://github.com/woocommerce/woocommerce-blocks/pull/10471)
* Convert to tsx and replace proptypes by ts definitions

* Fix imports

* Fix noReviewsPlaceholder type

* Fix ts errors

* Use createHigherOrderComponent in withReviews

* Revert hoc change

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2023-11-27 12:08:17 +01:00
Albert Juhé Lluveras 2f7bd83ae2
Fix link to e2e tests documentation from WooCommerce Admin directory (#41631)
* Fix link to e2e tests documentation from WooCommerce Admin directory

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-27 09:53:22 +01:00
Manish Menaria 53944beeb3 [Product Collection] Fix: HTML entity decoding for product names in Hand-Picked Products (https://github.com/woocommerce/woocommerce-blocks/pull/11927)
* Add HTML entity decoding for product names in Hand-Picked Products control

In the Hand-Picked Products control within the product-collection inspector controls, a function for decoding HTML entities in product names has been added.

- A new utility function `decodeHTMLEntities` has been implemented. This function decodes HTML entities in a string, ensuring that special characters are correctly displayed in their human-readable form.
- The `transformTokenIntoProductName` function has been updated to utilize `decodeHTMLEntities`. Now, when a product name is fetched (either directly as a token or via a product ID), the HTML entities within the name are decoded.
- This enhancement ensures that product names containing characters like ampersands or other HTML entities are accurately displayed in the UI.

This change improves the readability and accuracy of product names within the Hand-Picked Products control, enhancing the user experience for store managers using WooCommerce Blocks.

* Update label and hide description

This commit updates the `HandPickedProductsControl` component. Specifically, the user-facing label for product selection has been changed from 'Pick some products' to 'Hand-picked Products'. Additionally, the `__experimentalShowHowTo` property has been added with a `false` value, to hide description. Corresponding changes have been made in the E2E test file `product-collection.block_theme.spec.ts`, where the filter name is updated to match the new label.

* Refactor: Replace custom HTML entity decoder with `@wordpress/html-entities`

Rationale:
- The shift to `@wordpress/html-entities` aligns with standard WordPress practices, ensuring consistency across the platform.
- Enhances maintainability by relying on a well-supported library rather than custom code.
- Simplifies the codebase by removing a redundant utility function.

This change enhances the robustness of our code and aligns with best practices in WordPress development.
2023-11-27 12:27:04 +05:30
Sam Seay 1cd4df5b19 Migrate interactivity stock filter to new store API, add improvements and bugfixes (https://github.com/woocommerce/woocommerce-blocks/pull/11827) 2023-11-27 17:26:01 +13:00
Daniel Dudzic 590263543f Product Gallery Thumbnails: Add support for cropping (https://github.com/woocommerce/woocommerce-blocks/pull/11718)
* Product Gallery Thumbnails: Refactor sizing in the editor and the front end

* Product Gallery Thumbnails: Change default vertical alignment to top and better control the width of the thumbnails

* Product Gallery Thumbnails: Fix thumbnails cropping based on the 'Crop images to fit' setting

* Product Gallery Thumbnails: Revert thumbnails styling from woocommerce/woocommerce-blocks#11665

* Product Gallery Thumbnails: Update the default value of the cropImages setting to false
2023-11-24 23:49:44 +01:00
Daniel Dudzic 38b0001735 Product Gallery Thumbnails: Fix overflow issues and improve responsiveness (https://github.com/woocommerce/woocommerce-blocks/pull/11665)
* Product Gallery Thumbnails: Refactor sizing in the editor and the front end

* Product Gallery Thumbnails: Change default vertical alignment to top and better control the width of the thumbnails

* Product Gallery Thumbnails: Restrict the bottom position thumbnails width based on the total number of thumbnails set

* Product Gallery: Remove hardcoded width for Thumbnails and the Large Image and update the width inside of the Dialog

* Product Gallery Thumbnails: Introduce thumbnails scaling based on the number of thumbnails

* Product Gallery Thumbnails: Fix editor thumbnails scaling

* Product Gallery Thumbnails: Remove unused column gap variable

* Product Gallery Thumbnails: Fix styling for vertical images

* Product Gallery: Remove the unused editor.scss file

* Product Gallery: Fix the placement of the Thumbnails block in the block template

* Product Gallery Dialog: Reset changes to the dialog

* update @wordpress/e2e-test-utils-playwright package

* don't update node version

* remove waitForSiteEditorFinishLoading function

* use visitSiteEditor util

* Product Gallery Thumbnails: Add code comments

* Product Gallery Thumbnails E2E: Fix the test checking the default position of the thumbnails

* Product Gallery E2E: Fix the test checking if the cropping setting works correctly

* Product Gallery Thumbnails: Hide the Thumbnails block if there aren't at least 2 thumbnails to display

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2023-11-24 21:31:02 +01:00
mt8 e88a66eb25 Fix Downloadable Product Permissions: The text '-1' is rendered every time merchants click the 'Grant access' button without entering any product #31678 2023-11-25 03:46:24 +09:00
Alba Rincón c7182d9202 [Store Customization] AI-generated store name (https://github.com/woocommerce/woocommerce-blocks/pull/11878)
* Add new ai/store-title endpoint to update the store title with an AI generated one

* Add StoreTitle schema

* Fix error to response param

* Fix var name and tweak prompt

* Update comment

* Replace it by Ai generated if it's the default title

* Return error if AI failed

* Return false if the title is not updated with an AI one
2023-11-24 14:40:51 +01:00
Alba Rincón b6657403f8
[Store Customization] Update the store title with an AI generated one (#41632)
* Make the call to update the store title with an AI generated one

* Add changelog
2023-11-24 14:40:37 +01:00
github-actions[bot] 853ba527d2
Delete changelog files based on PR 41660 (#41669)
Delete changelog files for 41660

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2023-11-24 18:14:04 +08:00
rodelgc 597e2ed269
Update WooCommerce Core WP.org product page readme (#41660)
* update readme.txt for Woo Copy update on WP.org product page

* Transform to sub-header texts

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

---------

Co-authored-by: nigeljamesstevenson <nigeljamesstevenson@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2023-11-24 17:35:46 +08:00
Karol Manijak ff59efc27f Remove isExperimental flag from product-query module which is not experimental (https://github.com/woocommerce/woocommerce-blocks/pull/10531) 2023-11-24 08:36:30 +01:00
Sam Seay 9168b47f33 Translate the prefixes passed to post-terms in product-meta. (https://github.com/woocommerce/woocommerce-blocks/pull/11811) 2023-11-24 17:33:28 +13:00
Barry Hughes bedb4db309
Add legacy wc_format_postcode tests along with new tests for IE and PT postcodes (#31787) 2023-11-23 11:23:15 -08:00
Maikel David Pérez Gómez 55485012e5
[Grouped products] Inventory tab (#41640)
* The Track inventory toggle is not visible in the Inventory tab for grouped product types

* Add changelog file
2023-11-23 12:16:10 -05:00
Maikel David Pérez Gómez 829ca23326
[Grouped products] Create product-grouped feature flag (#41639)
* Create product-grouped feature flag

* Add support to the product editor to handle grouped product types as well

* Add changelog file
2023-11-23 11:24:51 -05:00
Paulo Arromba f60f10ad59 Update/testing instructions and changelog for 11.6.1 (https://github.com/woocommerce/woocommerce-blocks/pull/11923)
* Updated readme.txt and testing instructions

* Updated testing zip.

* Updated stable version
2023-11-23 15:52:20 +00:00
Fernando Marichal 4a0db06321
Modify notice for legacy local attributes (#41646)
* Modify notice for legacy local attributes

* Rename variable

* Add changelogs

* Rename local_attributes_notice_dismissed_ids
2023-11-23 12:00:17 -03:00
Roy Ho 9aea9ef53b Remove alignment from template part (https://github.com/woocommerce/woocommerce-blocks/pull/11891) 2023-11-23 05:40:17 -08:00
Mike Jolley 48777bb1ef Add missing woocommerce class (https://github.com/woocommerce/woocommerce-blocks/pull/11919) 2023-11-23 12:35:13 +00:00
Albert Juhé Lluveras c422227341 Fix an issue that caused the Order by select in Reviews blocks to always be disabled (https://github.com/woocommerce/woocommerce-blocks/pull/11918) 2023-11-23 12:59:14 +01:00
Albert Juhé Lluveras 8b6d81a7c3 Fix Reviews blocks not being rendered (https://github.com/woocommerce/woocommerce-blocks/pull/11913) 2023-11-23 10:52:06 +00:00
Karol Manijak b5e91ee460 Enable shrink columns option in Product Collection by default (https://github.com/woocommerce/woocommerce-blocks/pull/11821)
* Enable shrink columns option in Product Collection by default

* Improve tests about responsiveness

* Make regex allowing for floating pixels

* Related products should not use sticky and author attribute or have hardcoded queryId

* Bring back properties for Related Products as it's based on Propducts block, not Product Collection

* Enable shrink columns to fit by default in patterns
2023-11-23 10:10:19 +01:00
Alba Rincón 8cb50f1b59 Store Customization > Ensure the price for products is also AI-generated (https://github.com/woocommerce/woocommerce-blocks/pull/11859)
* Generate the product price with AI

* Fine tune the prompt to take into account the store currency

* Improve the price prompt
2023-11-23 09:58:09 +01:00
Luigi Teschio fc349610b0 add delete /pattern endpoint (https://github.com/woocommerce/woocommerce-blocks/pull/11890) 2023-11-23 09:42:06 +01:00
Karol Manijak 41d5a4bda6 Prevent shrinkColumns value when switching the layout type of Product Collection (https://github.com/woocommerce/woocommerce-blocks/pull/11905) 2023-11-23 08:17:35 +01:00
Jonathan Lane 595f99d933
Run daily smoke tests on wp-env (#41560)
* Run daily smoke tests on wp-env

* Add changelog

* Add step to install playwright to e2e tests

* Run k6 containers as e2e

* Get build first for k6

* Tweak for API report

* Change k6 tests back to non-local

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2023-11-23 12:41:27 +08:00
barryhughes e3d1a3c7b9 Convert comments to assertion messages. 2023-11-22 15:14:08 -08:00
barryhughes cd32a5a087 Changelog. 2023-11-22 15:13:06 -08:00
Saggre 74e27e6f26 Remove duplicate tests. 2023-11-22 15:09:37 -08:00
Damián Suárez 7a98a38399 fix eslint issue 2023-11-22 17:06:52 -03:00
Damián Suárez c9a211c6fb move changelog file to the proper place 2023-11-22 16:38:06 -03:00
Damián Suárez de1b1c89cf add tooltip helo to Organization/Attributes title 2023-11-22 16:38:06 -03:00
Damián Suárez 254469ddbe update/product-editor-add-missing-desc 2023-11-22 16:37:52 -03:00
Paulo Arromba 5a66522601
Update WooCommerce Blocks to 11.6.0 (#41641)
* Updated woocommerce/woocommerce-blocks to 11.6.0
2023-11-22 16:45:28 +00:00
And Finally 99d063095f
Marketplace: My Subscriptions feature branch (#40249) 2023-11-22 15:58:30 +00:00
Mike Jolley c8b48ed8d8
Remove "Checkout is not available whilst your cart is empty" notice (#41504)
* Remove "Checkout is not available whilst your cart is empty." notice

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-22 16:56:03 +01:00
Jorge A. Torres 409a256815
Fix TypeError in WC_Discounts->apply_coupons() when being called a second time [redux] (#41602)
* Discounts are not in the format `array( 'string' => 'string' )`, they are in the format `array( 'string' => array( int, int ) );`.

* Remove `ArrayUtil` because `ensure_key_is_array` creates the array and returns `true`.

* Add Changelog manually

* Fix changelog placement.

---------

Co-authored-by: John Rom <john@nimblelight.com>
2023-11-22 15:52:24 +00:00
Paulo Arromba 9a63503008 Update/11.6.0 changelog and testing instructions (https://github.com/woocommerce/woocommerce-blocks/pull/11904)
* Updated changelog and added testing instructions

* Updated changelog.

* Updated versions.

* Updated tested up to

* Updated tested up to

* Uploaded testing zip

* Removed woocommerce/woocommerce-blocks#11287 from testing instructions

* Added testing instructions and changelog for woocommerce/woocommerce-blocks#11858

* Updated testing zip

* Testing instructions for woocommerce/woocommerce-blocks#11862 and woocommerce/woocommerce-blocks#11860

* Updated testing zip

* New testing zip with woocommerce/woocommerce-blocks#11872 🍒

* Updated versions to 11.7.0-dev

* Updated composer.lock
2023-11-22 15:19:17 +00:00
And Finally 6e39f5494a Merge branch 'trunk' into feature/marketplace-subscriptions 2023-11-22 15:10:12 +00:00
And Finally 3b6d53efe5 Removed refresh button spin animation – was going backwards, and isn't consistent with general design approach. 2023-11-22 14:27:22 +00:00
And Finally 9dff04752f Addressing linter errors. 2023-11-22 14:23:51 +00:00
And Finally 5c88fd0490
Marketplace: fix sideways scrolling of the my subscriptions table on Chromium based browsers (#41630) 2023-11-22 13:59:56 +00:00
And Finally 1fc1d83931
Marketplace: update no results page (#41603) 2023-11-22 13:59:17 +00:00
And Finally 5a2d598159 Addressing linter errors. 2023-11-22 13:58:51 +00:00
And Finally 51321ee586
Merge branch 'feature/marketplace-subscriptions' into fix/my-subscriptions-scrolling-chromium 2023-11-22 13:39:23 +00:00
And Finally 3012a41f4e Reduced font weight in "no results" headers, to match the headers elsewhere in the Marketplace. 2023-11-22 13:37:37 +00:00
raicem 4e1ea5184e Marketplace: fix the number of cards in the number of results page
Co-authored-by: andfinally <andfinally@users.noreply.github.com>
2023-11-22 13:37:37 +00:00
raicem e3e3870cd7 Marketplace: fix some issues with the new no-results page
Co-authored-by: andfinally <andfinally@users.noreply.github.com>
2023-11-22 13:37:37 +00:00
raicem 36a4e5fc3c Marketplace: update no results screen for search 2023-11-22 13:37:37 +00:00
And Finally 3f6fd2c273
My Subscriptions: link product icon and product name to Woo.com product page (#41634) 2023-11-22 13:32:13 +00:00
berislav grgičak bfaceac842
Add Woo button to plugins list (#41633)
* Add Woo tab to the plugins screen

* Remove comment

* Update plugins/woocommerce/src/Internal/Admin/Marketplace.php

Co-authored-by: And Finally <andfinally@users.noreply.github.com>

* Update name

---------

Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2023-11-22 14:21:22 +01:00
And Finally 7ec9d60d8a Makes product icon and product name in My Subscriptions list link to Woo.com product page. 2023-11-22 13:05:10 +00:00
And Finally 6e124264be Addressing linter errors. 2023-11-22 13:00:20 +00:00
Roy Ho 82583fa3fb Don't register or unregister if block can't be found (https://github.com/woocommerce/woocommerce-blocks/pull/11872) 2023-11-22 12:50:56 +00:00
And Finally c336475d8e Addressing linter errors. 2023-11-22 12:43:49 +00:00
raicem 05d8169ec3 Marketplace: fix issue with sideways scrolling on my subscriptions table 2023-11-22 12:42:31 +03:00
Luigi Teschio 3302b24313 Update @wordpress/e2e-test-utils-playwright package (https://github.com/woocommerce/woocommerce-blocks/pull/11866)
* update @wordpress/e2e-test-utils-playwright package

* don't update node version

* remove waitForSiteEditorFinishLoading function

* use visitSiteEditor util
2023-11-22 09:19:00 +01:00
Jonathan Lane 633bf40f13
Add tests for analytics (orders) (#40504)
* Add tests for analytics (orders)

* Fix for download test

* E2E action scheduler runner (#40687)

* Add utility to trigger processing of pending scheduled actions (E2E).

* Update analytics test to use E2E scheduled action helper.

* Expand notes.

* No changelog needed.

* Further test setup work needed for Process Waiting Actions utility.

* Update download test

* Fix for FTUX tour, locator matching

* Update selectors

* Address review feedback

* Add comment to explain helper plugin

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2023-11-22 15:42:36 +08:00
Cem Ünalan 9a7a7e7f9c
Marketplace: Add Tracks events to My Subscriptions page (#41455)
* Marketplace: add Tracks events for the subscription page

Added events for:
- marketplace_product_installed
- marketplace_product_install_failed
- marketplace_renew_button_clicked
- marketplace_subscribe_button_clicked
- marketplace_product_updated
- marketplace_product_update_failed

* Marketplace: update Tracks properties

We used to reference product slug only. But may change and if the store
is rate limited, that information is missing. This commit switches
using "product_zip_slug" and "product_id".

* Marketplace: add product version info to update and install Tracks events
2023-11-22 09:40:18 +03:00
berislav grgičak 4c19b12c68
Add Marketplace readme (#41600)
* Marketplace readme

* Add structure and development

* Linter fix

* linter

* Tweaks to the In-App Marketplace README.

---------

Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2023-11-22 07:03:37 +01:00
RJ 2960529283
fix: revert adding envia slug (#41624) 2023-11-21 15:57:53 -08:00
nigeljamesstevenson 8ecb684da2
add: remove email marketing experiment (#41599) 2023-11-21 23:22:40 +00:00
Paul Sealock e701512f80
Merge Shipping Settings Legacy Refresh (#40983) 2023-11-22 12:20:34 +13:00
Jonathan Lane 34acf8cbcb
Improve e2e stability (#41345)
* Clean up created pages and posts

* Move tax tests so that they run last

* Improve locators

* Changelog

* Improve locators

* Improve locator on heading

* Change assertions to look for alert text

* Change assertion to look for text

* Update locators

* Update locator

* Update alternate elements

* Specify first order amount

* Update locator

* Changelog

* Increase reliability of checkout test

* Update a few locators

* Remove .slice()

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2023-11-21 14:26:09 -08:00
Thomas Roberts 2a281dbc74 Update changes after 11.4.9 2023-11-21 16:49:32 +00:00
Damián Suárez abe33ded3d Merge branch 'trunk' into update/product-editor-add-variation-pickup-help 2023-11-21 11:57:30 -03:00
Mike Jolley a8dd298d52 Update params for woocommerce_before_thankyou to mirror core hook (https://github.com/woocommerce/woocommerce-blocks/pull/11862) 2023-11-21 14:45:33 +00:00
Seghir Nadir f113a14b89 Validate coupon usage against customer id AND emails (https://github.com/woocommerce/woocommerce-blocks/pull/11860)
* validate coupon usage against user and email

* add checks for logged out user

* change to direct array call

* fix the query

* fix the query

* fix arrays

* fixe how id is fetched

* Make function private

* use implode instead of join

* coupon shouldnt be a pointer

* move ignore statement

* add comment about tentative usage

* Update src/StoreApi/Utilities/OrderController.php

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

* better validation for user data

* remove unused variable

* bail early if we dont have limits

* add empty line after function

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2023-11-21 14:33:40 +00:00
Niels Lange a0592778b6 Update notice for default cart and checkout (https://github.com/woocommerce/woocommerce-blocks/pull/11861)
* Update notice for default cart and checkout

* Show full translatable string
2023-11-21 21:23:13 +07:00
Maikel David Pérez Gómez b2c9373b19
[External products] Inventory tab (#41520)
* Hide track stock quantity toogle when the product type is external

* Add changelog file

* Fix php linter errors
2023-11-21 08:42:47 -05:00
Mike Jolley 51d3f9ca13 Add an example of woocommerce_store_api_add_to_cart_data (https://github.com/woocommerce/woocommerce-blocks/pull/11837) 2023-11-21 12:58:42 +00:00
Matt Sherman 820d83d40b
Fix return type of ProductFormTemplateInterface::add_group() (#41595) 2023-11-21 07:17:07 -05:00
Damián Suárez 1b3e3295a0 use uncheckedHelp to set the toggle help 2023-11-21 09:04:23 -03:00
Damián Suárez 4ffc4eda55 changelog 2023-11-21 09:04:20 -03:00
Damián Suárez 9ad4615527 add help for Product and Variation block instances 2023-11-21 09:04:20 -03:00
berislav grgičak 6f58b003a5
Marketplace subscriptions mobile fixes (#41597)
* Gradient fixes

* Responsive header
2023-11-21 12:43:06 +01:00
Leif Singer 39a1164d98
Update / tweak a few more links in docs and comments (#41598) 2023-11-21 12:38:09 +01:00
Chris Lilitsas 03937c7ccd
Remove hardcoded colors when using a block theme (#41366)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2023-11-21 12:35:12 +01:00
Jorge A. Torres e329ab19bd
HPOS verification tool should not report missing `_completed_date` meta as error (#41547) 2023-11-21 12:20:06 +01:00
Jorge A. Torres f2c700642e
Prevent double escaping of special chars in HPOS search query (#41516) 2023-11-21 12:17:10 +01:00
rjchow fcafacb36f lint 2023-11-21 18:08:00 +07:00
Thomas Roberts 409988881b Move `CheckboxControl` to components package and leave alias in checkout package (https://github.com/woocommerce/woocommerce-blocks/pull/11662) 2023-11-21 10:55:42 +00:00
rjchow 4df15fe948 add: remove email marketing experiment 2023-11-21 17:51:37 +07:00
David Arenas 9e9f0341e2 Interactivity API: implement the new `store()` API (https://github.com/woocommerce/woocommerce-blocks/pull/11071)
* Sync Interactivity API code with Gutenberg

* New store() API

* Store raw actions

* Update wc-interactivity-store implementation

* Replace `wc_store` with `wc_initial_state`

* Parse and populate initial state

* Allow store parts in `store()`

* Accept namespaces in directive paths

* Add $$namespace to directives' object values

* Make namespace parsing more robust

* Use DeepPartial type for store parts

* Do not pass `rawStore` to `afterLoad` callbacks

* Simplify `store()` a bit

* Implement `privateStore()`

* Sync context directive with Gutenberg

* Refactor scope and extract getters per scope

* Add namespace to getters and actions

* Remove current privateStore implementation

* Remove `afterLoad` option from `store`

* Use same proxy handlers for ns, getters and actions

* Set scope inside `evaluate`

* Refactor proxy handlers

* Improve types a bit

* Catch errors in async actions

* Implement stacks for scopes and namespaces

* Implement `getElement`

* Change directives object structure

* Remove unnecessary import

* Implement private stores

* Return value from sync actions

* Minor optimizations and improved comments

* Don't use async inside `data-wp-watch`

* Use a single Provider in context directive

* Remove DeepPartial type

* Do not check if element exists

* Add the `current` prop of state inside the scope

* Move getters outside scope

* Fix wc-key assignment

* Fix missing `navigate` in directives

* Fix namespace not being picked in the same element

* Deep merge raw stores instead of proxied ones

* Fix namespace assignment

* Allow forward slashes in namespaces

* Migration of Product Collection and Product Button blocks to the new `store()` API (https://github.com/woocommerce/woocommerce-blocks/pull/11558)

* Refactor Product Button with new store() API

* Use `wc_initial_state` in Product Button

* Fix namespace

* Remove unnecessary state

* Test namespaces in directive paths

* Add test context with namespace

* Simplify woo-test context

* Move addToCart and animations to a file

* Do not pass `rawStore` to `afterLoad` callbacks

* Move callbacks and actions back to the main file

Because the animation was broken.

* Remove selectors in favor of state

* Use default ns in `getContext` for state and actions

* Remove `afterLoad` callback

* Remove unnecessary ns

* Fix getContext in add-to-cart

* Replace namespace and delete unnecessary store

* Pass context types only once

* Use an alternative for requestIdleCallback

* Add previous react code for notices

* Add namespace to Product Collection block

* Replace getTextButton with getButtonText

* Add block name to the ProductCollection namespace

* fix style HTML code

* Remove circular deps error on the Interactivity API

* Product Gallery block: Migrate to new Interactivity API store (https://github.com/woocommerce/woocommerce-blocks/pull/11721)

* Migrate Product Gallery block to new Interactivity API store

* Fix some references

* Add missing data-wc-interactive

* Fix an additional namespace

* Remove unnecessary click handler

* Dialog working

* Refactor action names

* Reindex PHP array

There was some missing indexes, which turned the array into an object in JS.

* Remove unused event handlers

* Move next/previous logic to external function

* Move StorePart util to the types folder

* Rename namespace to `woocommerce/product-gallery`

* Undo product collection namespace renaming

* Remove unnecessary namespace

* Don't hide the large image on page load

* Minor refactorings

* Fix eslint error

* Fix php cs errors with spacing and double arrows alignment

* Disable no-use-before-define rule for eslint

* Disable @typescript-eslint/ban-types rule for eslint

* Fix parsed context error in e2e tests

* Fix context parser for Thumbnail image

* Move store to the top of the frontend file

* Add interactivity api utils to the @woocommerce/utils alias

* Replace deprecated event attribute

---------

Co-authored-by: Luis Herranz <luisherranz@gmail.com>
Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: roykho <roykho77@gmail.com>

---------

Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: roykho <roykho77@gmail.com>

* Fix error when closing product gallery dialog with keyboard escape key

* use wc_initial_state instead of wc_store

---------

Co-authored-by: Luis Herranz <luisherranz@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: roykho <roykho77@gmail.com>
2023-11-21 11:46:15 +01:00
rodelgc eab133cbe5
Update Action Scheduler to 3.7.0 (#41576)
* Update Action Scheduler to 3.7.0

* Update Action Scheduler to 3.7.0
2023-11-21 18:30:35 +08:00
Mike Jolley 3a49ae4dd3 Add tests for company address field (https://github.com/woocommerce/woocommerce-blocks/pull/11807)
* Company field tests

* Click page body before unchecking box
2023-11-21 10:04:51 +00:00
Luigi Teschio 86ab0ab3b1 Product Button: enqueue always the store (https://github.com/woocommerce/woocommerce-blocks/pull/11858) 2023-11-21 10:26:16 +01:00
Tung Du 3b31aa715c add: default template for Collection Filters block (https://github.com/woocommerce/woocommerce-blocks/pull/11805) 2023-11-21 16:25:43 +07:00
Daniel Dudzic eaa9e74a58 Run E2E test suite on Twenty-Twenty Four (https://github.com/woocommerce/woocommerce-blocks/pull/11466)
* Run E2E test suite on Twenty Twenty-Four

* Update TT4 download URL to the stable one

---------

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2023-11-21 09:11:19 +00:00
Bero 7a2aaac112 Remove changelogs 2023-11-21 08:35:00 +01:00
berislav grgičak ab400a4128
Unconnected subscription improvements (#41468)
* Don't show a My Subscriptions group if it's empty

* Hide expiry if installed but has no subscription

* Show subscription status labels in a column

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

* Show only one badge

* Show installed header if no installed items

* Remove test code

* Show entire installed section

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-21 08:33:06 +01:00
Manish Menaria 0444407d70 Fix: 404 error for No results block CSS file (https://github.com/woocommerce/woocommerce-blocks/pull/11854)
This commit introduces the `get_block_type_style` method in the `ProductCollectionNoResults` class. This new method is designed to manage frontend style handling specifically for this block type. Currently, it returns null, indicating no specific styles are assigned at this stage.
2023-11-21 12:53:26 +05:30
Tung Du 182e821539 MVP: Attribute filter block powered interactivity API (https://github.com/woocommerce/woocommerce-blocks/pull/11749)
* Update Interactivity API JS files

* Disable TS checks in the Interactivity API for now

* Add new SSR files

* Replace wp_ prefixes with wc_ ones

* Replace wp- prefix with wc-

* Replace guternberg_ prefix with woocommerce_

* Remove file comments from Gutenberg

* Rename files with `wp` prefix

* Fix code to load Interactivity API php files

* Remove TODO comments

* Replace @wordpress with @woocommerce

* Update Webpack configuration

* Fix directive prefix

* Remove interactivity folder from tsconfig exclude

* Add client-side navigation meta tag code

* Remove unneeded blocks.php file

* Fix store tag id

* Register Interactivity API runtime script

* Fix Interactivity API runtime registering

* Add Simple Price Filter block

* Remove all files related to directive processing in PHP

* Use values directly for SimplePriceFilter SSR

* Reset pages to 0 when changing filter

Note: we also need to do this with `/page/x`

* wip

* phpcs

* register price filter as inner block

* try: render block using save

* add types

* use min range var instead of 0

* inject dynamic data

* query price data in editor

* better injecting interactivity data

* remove rounding

* Product Collection Data endpoint doesn't care about current query so we remove the context for now

* extract data injecting as a method, possbily a trait in the future

* add sidebar setting

* duplicating the markup in php render callback for safety

* remove directive from edit component

* show prices without decimal

* use final class

* use sample collection data response

* prepare for multiple styles support

* use collection data from context

* cleanup props and props passing

* pass only necessary states

* retire heredoc in favor of late escaping

* reorganize style

* inherit style from current price filter react component, pre extract the component for multiple display style support

* keep minPrice smaller than max

* remove unnecessary active handler logic

* update folder structure

* avoid whitespace change

* clean up

* title

* move inspector to component folder, ready to be extracted to inner block

* block icon

* block name

* name

* use inner block for view

* inner block view switcher

* try: process data in Collection Filtes block only

* wip: query collection data from collection filters block only

* provide all context from collection filters block

* simplify context passing

* feat: use default attribute to define filter type of view block

* rename

* remove price block

* rename price slider to price, default price filter should be a slider

* type cleanup

* fix ancestor block name

* only passing the collection data down

* wip

* recusive

* editor preview

* refactor: data fetching, context passing, and code organization

* initial attribute filter block

* feat: attribute selector

* inspector control

* wip

* break the edit into smaller components

* wip: editor component

* extract checkbox list

* wip editor preview

* show count checkbox list

* fix param aggregation for attribute filter blocks

* post merge fix

* fix param aggregation for attribute filters

* fix: set correct selected attribute

* WIP checkbox list

* WIP checkbox list

* avoid action name conflicts

* Checkbox list front end

* phpcs

* update context on input, navigate on change

* fix: attribute selection

* dropdown

* remove isDeepEqual

* add: warning when attribute has no products or no attribute is selected

* update type

* update type

---------

Co-authored-by: David Arenas <david.arenas@automattic.com>
Co-authored-by: Luis Herranz <luisherranz@gmail.com>
2023-11-21 14:22:20 +07:00
Kyle Nel 53b8933e7c
Merge Marketplace subscriptions changelogs (#41575)
* Merge changelogs into one
* Update plugins/woocommerce/changelog/feature-marketplace-subscriptions

Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2023-11-21 09:15:29 +02:00
berislav grgičak 48d7490c2a
Marketplace design improvements (#41505)
* Not connected screen fixes

* Table improvements

* Success notice icon

* Use the same layout of columns for both tables

* Popover

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

* CSS lint fixes

* Styling tweaks. Changed font-weight of `.woocommerce-marketplace__product-list-title` to 400, to correspond with the correct weight of the titles like "Installed on this store" in the My Subscriptions section.

* Undo refresh move

* Fix subgrid max widths

* Fic status height

* Update collaborate link

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2023-11-21 08:08:26 +01:00
Kyle Nel 5fe2e401f0
Marketplace - tracking enhancements (#41365)
* Add discover products to page view event

* Initial implementation of beacon REST API (WIP)

* Discover page - products viewed

* Product card clicked event (WIP)

This takes data from various sources and sends it based on the different places that product cards could appear.

Data included:
- position
- vendor
- product type
- label - indicates if "promoted" if applicable
- group - the discover page group if applicable
- search_term - the search term if applicable
- category - the product category clicked from

The data is essentially complete. The beacon API needs finalising still though. Also, the vendor name click event will need to be updated with the same data.

* See more button & Category dropdown "more" events

* Marketplace: remove custom Beacon and use "queueRecordEvent"

* Marketplace: reenable product card links

This was disabled temporarily while we tested tracks on click

* Marketplace: Add position to tracks event

Co-authored-by: Kyle Nel <22053773+kdevnel@users.noreply.github.com>

* Marketplace: move Tracks data to a different prop and type

* Marketplace: refactor Tracks calls in product card

---------

Co-authored-by: raicem <unalancem@gmail.com>
Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
2023-11-21 09:48:59 +03:00
Tung Du 73d89b77a7 Fix: Product Collection show products with correct stock statuses (https://github.com/woocommerce/woocommerce-blocks/pull/11708)
* update the get visibility query method

* fix the condition

* remove unnecessary test
2023-11-21 11:29:24 +07:00
RJ a32e1a3922
dev: fix wca test helper option search wildcards (#41503)
fix wca test helper option search wildcards
2023-11-21 11:18:45 +08:00
paul sealock 6339f1628a remove unnecessary changelog files 2023-11-21 13:57:27 +13:00
paul sealock 434cbbaa2c Fix linter error 2023-11-21 13:57:27 +13:00
Paul Sealock 92ede6dc76 Shipping Settings: Update Flat Rate edit copy (#41529) 2023-11-21 13:57:27 +13:00
Paul Sealock 7804f3b71b Shipping Settings: Handle Local Pickup default value (#41481)
* set default to zero

* handle no default
2023-11-21 13:57:27 +13:00
paul sealock c4f45e3eaa fix e2e shopper tests 2023-11-21 13:57:27 +13:00
Paul Sealock 45bd173551 Shipping Settings: Fix updates to copy (#41445)
* Update copy

* Remove uppercase from labels

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-21 13:57:27 +13:00
Paul Sealock 1b7035c411 Shipping Settings: Fix broken e2e tests (#41446)
* give settings proper names

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-21 13:57:27 +13:00
Paul Sealock b82b3e452c Shipping Settings: Fix shipping zones tour copy (#41015) 2023-11-21 13:57:26 +13:00
Paul Sealock ff1d69efb1 Shipping Settings: Handle long help tip text (#41035) 2023-11-21 13:57:26 +13:00
Paul Sealock 6021e78cdc Shipping Settings: Handle theme colors (#41054)
* Fix primary btns colors

* go back to var(--wp-admin-theme-color)

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-21 13:57:26 +13:00
github-actions 8329991262 Add changefile(s) from automation for the following project(s): woocommerce 2023-11-21 13:57:26 +13:00
Paul Sealock 050325c296 Shipping Settings: Update help text on add method modal (#40982)
Move description to bottom of modal
2023-11-21 13:57:26 +13:00
Paul Sealock 3ddb46bad7 Shipping Settings: Add currency symbols (#40816) 2023-11-21 13:57:25 +13:00
Paul Sealock 6ee12c8308 Shipping Settings: Update shipping settings copy (#40893) 2023-11-21 13:57:25 +13:00
Paul Sealock 0d23235d0e Shipping Settings: Add classes cost link to Flat rate methods (#40860) 2023-11-21 13:57:24 +13:00
Paul Sealock 6f460e603a Shipping Settings: Remove zone method defaults (#40838) 2023-11-21 13:57:24 +13:00
Paul Sealock 1a0da8a62d Shipping Method Settings: Update modal contents (#40615) 2023-11-21 13:57:23 +13:00
Paul Sealock 3ec81818d1 Shipping Settings: Update table styles (#40724) 2023-11-21 13:57:23 +13:00
Paul Sealock 7822326a98 Shipping Settings: Tweak Post Codes UI styles (#40554)
* Tweak Post code UI styles

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-21 13:57:23 +13:00
Paul Sealock 87934129f6 Shipping Classes: Create add/edit modal functionality (#40421)
* Components: TreeSelectControl - Make sure individuallySelectParent value is preserved (#40301)

* make sure individually selected parent value is preserved

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

---------

Co-authored-by: github-actions <github-actions@github.com>

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

* fix rebase error

* appease linter

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-21 13:57:23 +13:00
paul sealock b6bd4df17a Use clearOnSelect false 2023-11-21 13:57:23 +13:00
paul sealock 5fd19f53fa Shipping Zone CSS changes 2023-11-21 13:57:23 +13:00
Paul Sealock 016f87d920 Shipping Settings: Add React base Region Picker (#40184) 2023-11-21 13:57:23 +13:00
Matt Sherman e3c92601c8 Changelog 2023-11-20 18:57:30 -05:00
Matt Sherman 86e8036241 Correct return type of add_group() 2023-11-20 18:55:35 -05:00
Leif Singer 2d44b1f94b
Add `store_id` to system_status REST API (#41341) 2023-11-20 19:37:20 +01:00
Fernando Marichal f78cf190c8
Update variations message to include missing downloads section (#41581)
* Update variations message to include missing downloads section

* Add changelog
2023-11-20 13:59:31 -04:00
Patricia Hillebrandt 9b99154d72 Customize your Store > Implement retry mechanism, enhance prompts and fix issue with AI content not being generated for new products (https://github.com/woocommerce/woocommerce-blocks/pull/11759)
* Fine-tune the prompts for generating product titles.

* Update the prompt for images.

* Update the prompts for generating content for patterns.

* Break down the pattern content generation into individual methods.

* Add character limit to prompts.

* Add character limit for a handful of titles.

* Add character limit to the title of the product-collection-4-columns pattern.

* Update the prompt to not add abbreviations

* Introduce the refine_returned_images_results method for AI to filter the images returned by Pexels

* Implement retry if the number of images returned by Pexels API is smaller than the number of images required by products and patterns.

* Update the prompt for the images search term.

* Fix AI image assignment for newly created products and improve performance.

* Ensure no additional dummy products are created or updated in simultaneous requests.

* Fix error on generating content for patterns for the first time and saving it to the post.

* Return error if the connection with AI failed.

* Update the prompt character limit for the Featured Category Triple pattern.

* Implement retry if the API connection with AI fails. Update the prompt to remove the length instruction. Add the last_business_description check to prevent duplicated API calls. Set a transient for images in case the request fails.

* Add retry for returning the refined search results. Update the prompt for defining the search term. Update error validation.

* Update the structure for fetching patterns content and reduce the number of requests.

* Break down the pattern ai content generation and assignment into multiple methods and introduce retry in case of failure.

* Update the structure for applying the AI generated content to patterns. Update the fetch and validation of ai responses and update the prompt to ensure longer texts are returned.

* Update the validation of the content returned by AI by verifying the array keys and ensuring the values are not empty. Additionally, the completion should be set.

* If for some reason AI didn't return the complete list of expected generated content, use the same the previous text from the same pattern as a replacement and avoid making an extra request to fetch just fetch a possible missing result.

* Update prompts for patterns.

* Make a single request to fetch all products data, implement retry for products and validation for the response returned by AI.

* Update the retries variable first within the patterns loop.

* Narrow down the AI content generation to only patterns that are part of the Assembler.

* Update the size of images and the prompt for AI generated content assigned to products.

* Don't make request to AI if the user provided a single word for their business description.

* Update the image assignment to products and remove the unused update_dummy_products method.

* Update the prompt for generating content for patterns.

* Update the prompt for products content generation and ensure that an error is returned if all requests fail.

* Update the prompt for patterns.

* Update the prompt for images.

* Update the prompt for images.

* Update prompt for button text.

* Don't schedule action for updating patterns content if the business description wasn't updated.

* add associative option when the local json is parsed

* Ensure the expected list of results matches the number or products to be updated.

* fix lint error

* Address CR.

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2023-11-20 16:59:52 +00:00
Mike Jolley 38441fb3dc Check `init_session_cookie` is callable (https://github.com/woocommerce/woocommerce-blocks/pull/11785) 2023-11-20 16:37:13 +00:00
Alex Florisca 8b45dbfecd Add storybook entry for StoreNotice component (https://github.com/woocommerce/woocommerce-blocks/pull/11790)
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2023-11-20 15:49:40 +00:00
Thomas Roberts 777f8c049f Add Storybook entry for `Panel` (https://github.com/woocommerce/woocommerce-blocks/pull/11818) 2023-11-20 15:26:21 +00:00
Nathan Silveira 5bba23ddb1
Fix currency breaking lines when 2 or more characters (#41548)
* Fix currency breaking lines when 2 or more characters

* Add missing changelog
2023-11-20 11:50:20 -03:00
WooCommerce Bot 12b661bb5b Delete changelog files for 41538 2023-11-20 14:10:27 +00:00
Luigi Teschio b2046300d1 Update patterns with the new images (https://github.com/woocommerce/woocommerce-blocks/pull/11782)
* delete current images used in the patterns

* Update Feactured Category Cover Image Pattern

* Update Hero Product split pattern

* Update just arrived full hero pattern

* Update Featured Category Triple pattern

* Update Hero Product 3 Split pattern

* Update Hero Product Chessboard

* Update Alterning image and text pattern

* Update Testimonial single pattern

* Update Follow Us on social media pattern

* Update Banner pattern

* Update Alternating Image and Text pattern

* Update Hero Product Chessboard

* Update Featured Category focus pattern

* Update banner pattern

* restore images

* update hero product 3 split pattern

* remove duplicate image

* update dictionary json

* update banner pattern

* optimize image

* fix validation

* fixed width and height

* Replace image Featured Category Focus pattern
2023-11-20 14:43:27 +01:00
Manish Menaria 26550194d3 Product Collection - New 'No Results' block with default UI (https://github.com/woocommerce/woocommerce-blocks/pull/11783)
* Add custom 'No Results' block for Product Collection

This commit introduces a new 'No Results' block, replacing the default core 'query-no-results' block within product collection block. The 'No Results' block provides a tailored experience for WooCommerce stores, displaying a custom message when no products are found in a query.

Key changes include:
- A new block type 'woocommerce/no-results' is registered with a complete configuration and content structure.
- Edit and save functions are implemented for the block, allowing for custom content and styles within the block editor and on the front end.
- Webpack entries are updated to include the new block in the build process.
- A PHP class NoResults is added for server-side rendering, which only displays the block when the product query returns no results, enhancing performance.
- The ProductCollectionUtils utility class is extended to support the new block's query needs.

The new block enriches the user experience by providing clearer communication when no products match the collection criteria and allows store owners to customize the message and presentation.

* Update description

* Rename 'no-results' block to 'product-collection-no-results'

Changes include:
- Updating the block name in `edit.tsx` within the `product-collection` directory.
- Modifying the block.json file in the `no-results` inner block to reflect the new name.
- Adjusting the className in `edit.tsx` for the `no-results` inner block.
- Altering the webpack entries in `webpack-entries.js` to recognize the new block name.
- Renaming the block in `NoResults.php` to align with this update.

This renaming aims to make the block's purpose more clear and to maintain a consistent naming scheme within our product collection blocks.

* Rename NoResults to ProductCollectionNoResults for clarity

This commit renames the `NoResults` class to `ProductCollectionNoResults`. The change aims to enhance clarity and specificity about the class's purpose, indicating that it specifically handles no-result scenarios within product collections.

Changes made:
- Renamed `NoResults.php` to `ProductCollectionNoResults.php`.
- Updated the class name from `NoResults` to `ProductCollectionNoResults` in the file.
- Modified the reference in `BlockTypesController.php` to use the new class name.

This renaming ensures better readability and understanding of the class's role in the context of product collections. The primary change is the renaming, with no significant alterations in the class functionality.

* Update No-Results Message Formatting in Product Collection Block

This commit simplifies the layout and message content for the 'No results found' message in the product collection block's no-results edit component. The changes include:

1. Removal of the full stop in the 'No results found' string for consistency.
2. Replacing the 'core/group' block with a 'core/paragraph' block.
3. Streamlining the message content to be more concise and integrated into fewer text blocks.
4. Direct links for 'clearing any filters' and navigating to the 'store's home' are now included in the same paragraph.

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-11-20 13:18:59 +00:00
Thomas Roberts ddcd32897b Rename Checkbox List story to work with storybook 7 (https://github.com/woocommerce/woocommerce-blocks/pull/11679) 2023-11-20 13:15:22 +00:00
Thomas Roberts 143f493097 Add Storybook entries for `TextInput`, `ValidatedTextInput`, and `ValidationInputError` (https://github.com/woocommerce/woocommerce-blocks/pull/11794) 2023-11-20 13:08:16 +00:00
Niels Lange e6a885283b Increase CSS specificity for local pickup address (https://github.com/woocommerce/woocommerce-blocks/pull/11772)
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-11-20 13:07:00 +00:00
Mike Jolley 0981e973c5 Continue validating after doing nested properties (https://github.com/woocommerce/woocommerce-blocks/pull/11792) 2023-11-20 13:05:42 +00:00
Thomas Roberts cc84383730 Move all totals components into components package (https://github.com/woocommerce/woocommerce-blocks/pull/11773)
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-11-20 12:53:41 +00:00
Paulo Arromba 1da927c64d Updated composer.lock and minor deps (https://github.com/woocommerce/woocommerce-blocks/pull/11817)
* Updated composer.lock and minor deps

- Upgrading automattic/jetpack-admin-ui (v0.2.23 => v0.2.25)
- Upgrading automattic/jetpack-connection (v1.58.2 => v1.60.1)
- Upgrading automattic/jetpack-status (v1.18.5 => v1.19.0)
- Upgrading theseer/tokenizer (1.2.1 => 1.2.2)
2023-11-20 12:51:14 +00:00
Mike Jolley 1f1808e616 Fix strings in classic-checkout modal window (https://github.com/woocommerce/woocommerce-blocks/pull/11771)
* Fix strings in modal window

* Update assets/js/editor-components/incompatible-extension-notice/modal.tsx

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

---------

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2023-11-20 12:36:49 +00:00
Thomas Roberts eaab9950af Update Puppeteer E2E tests to WP 6.4.1 and disable failing ones (https://github.com/woocommerce/woocommerce-blocks/pull/11816)
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2023-11-20 13:06:12 +01:00
Leif Singer f7b6647016 fix typo 2023-11-20 12:45:29 +01:00
Alex Florisca edbfb862b1 Update payment docs (https://github.com/woocommerce/woocommerce-blocks/pull/11751)
* Update payment docs

* Update payment docs

* Update docs/internal-developers/block-client-apis/checkout/checkout-flow-and-events.md

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2023-11-20 11:36:19 +00:00
Leif Singer fdfa10aa36 appease the linter 2023-11-20 12:26:42 +01:00
Leif Singer cd1227be76 ensure we use any existing `store_id` 2023-11-20 12:04:55 +01:00
Leif Singer 8a68d722e8 ensure that `store_id` is returned by the API call to get the SSR 2023-11-20 11:41:20 +01:00
Leif Singer 85814deeb6 update the test that counts the number of fields in the SSR API response 2023-11-20 11:40:40 +01:00
Gan Eng Chin 6fb787e954
Remove Codisto from default free extensions. (#41499) 2023-11-20 14:26:05 +08:00
RJ a619f2be67
added envia's plugin slug to shipping task partner suggestions (#41539)
* added envia's plugin slug to shipping task partner suggestions

* changelog
2023-11-18 10:23:10 +08:00
Moon 9a651da622
Add payment-gateway-suggestions cache unit test (#41412)
* Add payment-gateway-suggestions cache test

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

* Fix broeken test

* Fix broeken test

* Fix broeken test

* Lint fix

* Refactor test

* Lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-17 13:39:11 -08:00
github-actions 0687e86c92 Add changefile(s) from automation for the following project(s): woocommerce 2023-11-17 19:31:18 +00:00
AnnaMag e68b1792d9
Add digital products to the new experiment testing the product editor. (#41469)
* Add digital product task selection to the A/B test for WC 8.4.

* Add changelog

* Enable the product-virtual-downloadable feature.

* Fix linting error

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-11-17 15:05:03 -04:00
Jorge A. Torres 1d00e76fda
Invalidate coupon cache after hold/usage data is modified in datastore via SQL (#41538)
* Invalidate coupon cache after direct SQL queries

* Add changelog

* Add unit test

* Address feedback
2023-11-17 15:25:10 +00:00
Thomas Roberts 894f8e9ac4 Remove unused Verticals client PHP tests (https://github.com/woocommerce/woocommerce-blocks/pull/11813) 2023-11-17 06:02:58 -08:00
nigeljamesstevenson 00e1a29194
dev/fix no use before define lint violations (#41452) 2023-11-17 12:05:18 +00:00
Chi-Hsuan Huang c768ca0dc6
[CYS] Remove `getLookAndTone` AI request from the business description step (#41497)
* Remove AI requests from the business description step

* Add changelog
2023-11-17 19:40:43 +08:00
Chi-Hsuan Huang d379a3de85
[CYS] The “Preview" on the transitional screen doesn’t represent our custom color palette (#41496)
* Fix the “Preview” on the transnational screen doesn’t represent our custom color palette

* Add changelog

* Fix setCanvasMode
2023-11-17 19:35:52 +08:00
RJ 225e020d50
add: modified cys business info placeholder (#41532) 2023-11-17 19:08:32 +08:00
github-actions[bot] 6b5c98ad17
Delete changelog files based on PR 41535 (#41537)
Delete changelog files for 41535

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2023-11-17 17:40:37 +08:00
rodelgc d02f6743fd
Cherry-pick #287 into trunk (#41535)
* Add nonce check during process_bulk_action

The webhooks screen already has a nonce field available, so all that's needed here is to verify the nonce when processing a delete action.

Fixes #284

* Add e2e regression test

* Check admin referer on all present/future actions, not just delete

* Add cleanup after e2e test

* Updates to e2e test

* Use better locators (user facing)
* Simplify some assertions
* Better usage of networkidle
* Remove empty catch clauses

* Add changelog

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2023-11-17 16:53:19 +08:00
Ron Rennick b5b364e902 revert stalebot to v8 and single run 2023-11-16 17:24:32 -04:00
Maikel David Pérez Gómez ed0d38c44b
[External products] Product details (#41442)
* Add buy button section

* Enable external product support into the product block editor

* Hide buy button section when product type is not external

* Remove BaseControl from TextControl since it's not required anymore, InputControl takes care of that now

* Add type and suffix support to the product-text-field block

* Add the placeholder to the external url input and remove required constraint to the buy button text

* Set the url icon link type to external

* Fix input border to be red when invalida now that base control is not present twice

* Set the min height to 36px to match others non InputControls components height

* Extends required constrain to also support a custom error message

* Extends the product-text-field validation system

* Add product-text-field documentation

* Add changelog files

* Fix php linter error

* Fix compilation error

* Fix linter errors
2023-11-16 14:11:44 -05:00
rodelgc 89514921f9
Update stable tag to 8.3.0 (#41519)
woorelease: Update stable tag to 8.3.0

Co-authored-by: rodel <rodel@rodels-MacBook-Pro.local>
2023-11-17 03:00:38 +08:00
dependabot[bot] 471b9a1b60 Bump @wordpress/icons from 6.1.1 to 9.36.0 (https://github.com/woocommerce/woocommerce-blocks/pull/11611)
* Bump @wordpress/icons from 6.1.1 to 9.36.0

Bumps [@wordpress/icons](https://github.com/WordPress/gutenberg/tree/HEAD/packages/icons) from 6.1.1 to 9.36.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/icons/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/icons@9.36.0/packages/icons)

---
updated-dependencies:
- dependency-name: "@wordpress/icons"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add sparkles icon to codebase

* Fix failing JS-unit tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2023-11-16 17:40:53 +00:00
Christopher Allford 8fcef3b2d3
Prepared 2.3.0 Beta Tester Release (#41513) 2023-11-16 08:59:42 -08:00
Mike Jolley 377a3d9931 Make "Use same address for billing" visible by default (https://github.com/woocommerce/woocommerce-blocks/pull/11804) 2023-11-16 16:41:52 +00:00
Gan Eng Chin 20ab36ed4c
Merge branch 'trunk' into remove/marketing-codisto 2023-11-16 23:43:31 +08:00
Albert Juhé Lluveras 34432f150c Update Smoke Testing docs to reference Product Collection block and Cart/Checkout templates (https://github.com/woocommerce/woocommerce-blocks/pull/11713)
* Update smoke testing docs to mention the Product Collection block instead of the Products block

* Mention that Cart and Checkout blocks need to be added to the template instead of the pages

* Update docs/internal-developers/testing/smoke-testing.md

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

---------

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2023-11-16 16:25:34 +01:00
Ron Rennick 6402bf8aa3
use latest commit of stalebot action, tweak configuration accordingly (#41305)
* use latest commit of stalebot action, tweak configuration accordingly

* remove stalebot.js

* use default operations per run

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-11-16 09:15:08 -06:00
Alexandre Lara c8ef0fb3af Product Gallery block: Restrict block to be available only on the Single Product template or the Product Gallery template part (https://github.com/woocommerce/woocommerce-blocks/pull/11664)
* WIP: experimenting with strategy pattern for block registration

* Add TemplateChangeDetector to BlocksRegistrationManager

* Handle blocks registration

* Fix issue causing blocks to be registered multiple times

* Allow register/unregister blocks when on pages or posts

* Add BlockRegistrationStrategy logic

* Fix import error

* Add doc comments for BlockRegistrationManager class

* Add doc comments to TemplateChangeDetector class

* Fix eslint errors

* Import domReady from @wordpress/dom-ready

* Prevent error when using blockName for registerBlockType function

* Add e2e tests to check for block availability in different contexts

* Add e2e tests to cover block availability on different contexts
2023-11-16 15:03:58 +00:00
github-actions 420d219c2c Add changefile(s) from automation for the following project(s): @woocommerce/eslint-plugin, @woocommerce/components, @woocommerce/api, woocommerce 2023-11-16 19:21:30 +08:00
rjchow 5d99b267bf fix: fixed all instances of no-use-before-define lint rule violations 2023-11-16 19:21:30 +08:00
RJ b61b86545a
fix: fixed all instances of translator lint rule violations (#41450)
* fix: fixed all instances of translator lint rule violations

* Add changefile(s) from automation for the following project(s): @woocommerce/eslint-plugin, @woocommerce/components, woocommerce

* fix i18n lint violations in @woo/components

* fix all i18n lint rule violations in @woo/product-editor

* Add changefile(s) from automation for the following project(s): @woocommerce/product-editor, @woocommerce/eslint-plugin, @woocommerce/components, woocommerce

* empty commit to trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-16 19:15:11 +08:00
berislav grgičak b3d24ef7d1
Update refresh button to use API (#41397)
* Add refresh to subscription context

* Add refresh button

* Prevent multiple clicks

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

* Fix notices

* Refresh notices

* Trigger Build

* Add spacing and fix class name

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-16 11:51:30 +01:00
Hsing-yu Flowers 1a0a785227 Fix the order endpoint tax line items format (https://github.com/woocommerce/woocommerce-blocks/pull/11796) 2023-11-16 10:20:08 +00:00
Vlad Olaru 5b209199a0
Use a transient when computing orders in the last 90 days (#41466) 2023-11-16 10:55:52 +02:00
github-actions 2de28b04d0 Add changefile(s) from automation for the following project(s): woocommerce 2023-11-16 08:38:24 +00:00
Gan Eng Chin 9118823382
Remove Codisto from test. 2023-11-16 16:22:33 +08:00
Gan Eng Chin f1cc9e6a57
Remove Codisto from default free extensions. 2023-11-16 16:21:37 +08:00
Vlad Olaru fb381bd03c
docs: Improve inline docs 2023-11-16 10:11:10 +02:00
Corey McKrill 0a98a249b0
Update CSV export escape characters (#41464) 2023-11-15 14:38:41 -08:00
Roy Ho 8f3f630522 Product gallery/dialog/enhancement (https://github.com/woocommerce/woocommerce-blocks/pull/11755)
* Hide pager in dialog

* Product Gallery: reset main image when dialog closes

* Product Gallery block: Add product title to dialog

* Align double arrow

* Use H2 to be more semantic

* Use product title block in template part

* Default pager to off

* Remove pager only in dialog

* Remove unused param

* Default pager to off instead of removing
2023-11-15 13:05:51 -08:00
Matt Sherman f4596deddb
Template API: Server-side logging (#41316) 2023-11-15 11:07:11 -05:00
Mike Jolley fd4675aa6a Refactor default editing state for customer address fields (https://github.com/woocommerce/woocommerce-blocks/pull/11765)
* Refactor default editing state for customer address fields

* Exclude email from invalid props check

* Merge conflict
2023-11-15 15:22:36 +00:00
rodelgc 62877a9d1d
Change plugin name to "Woo Subscriptions" in release and daily testing workflows (#40460)
* Update spec

* Update daily, release workflows

* Conditionally post slack summary

* Add changelog
2023-11-15 23:08:47 +08:00
Vlad Olaru 7a1eed28c5
Add changelog entry 2023-11-15 15:23:45 +02:00
Vlad Olaru a7a0aa9f8d
Refactor has_orders to use a transient and avoid queries as much as possible 2023-11-15 15:19:41 +02:00
Chi-Hsuan Huang 05cfe2fe98
Improve CYS assembler hub performance (#41453)
* Use custome iframe to improve iframe loading performance

* Add loadStyles and loadScripts props

* Fix sidebar pattern rerendering issue

* Add changelog

* Fix prop name

* Fix isScrollable
2023-11-15 21:06:05 +08:00
Leif Singer bf2d7760ff add changelog file 2023-11-15 14:01:54 +01:00
Leif Singer 1a6961095d ensure tab and carriage return are covered by the test 2023-11-15 14:00:30 +01:00
Chi-Hsuan Huang e486d0a7e9
[CYS] Tweak intro page banner style (#41458)
* Tweak cys banner style

* Add changelog
2023-11-15 20:51:23 +08:00
Leif Singer 20f2df8779 update list of CSV characters to prepend with a tick when occurring at the beginning of a cell 2023-11-15 13:43:46 +01:00