* Do not show product card footer for Business Services products
* Add changefile(s) from automation for the following project(s): woocommerce, woocommerce/client/admin
---------
Co-authored-by: github-actions <github-actions@github.com>
* Run `wc_update_950_add_brands_enabled_option` on WC 9.5 update
* Add changefile(s) from automation for the following project(s): woocommerce
* Update wc-update-functions.php
---------
Co-authored-by: github-actions <github-actions@github.com>
* Improve required info for screen readers on checkout fields
* Add style to inline error message on checkout fields
* Add id attribute to terms error
* Improve accessibility of checkout errors messages
* Prevent screen readers from reading the asterisk on checkout fields
* Revert spacing change
* Revert spacing change
* Add changelog file
* Decrease line length
* Lowercase the required term
* Fix query methods in checkout tests
* Add space before required text for screen readers
* Fix query of shipping fields on legacy checkout tests
* Remove asterisk from field name on legacy checkout test
* Remove invalid character in Phone and Email fields on legacy checkout test
* Add asterisk to get phone and email by label on legacy checkout test
* Fix field labels for legacy checkout tests
* Fix php lint errors
* Add required tem to the Government ID input on tests
* Revert changes on required fields label
* Create checkout-inline-error-message mixin
* Replace SCSS variable with a CSS one
* Add checkout inline error message to T17
* Add checkout inline error message to T19
* Add checkout inline error message to TT
* Add checkout inline error message to TT1
* Add checkout inline error message to TT2
* Add checkout inline error message to TT3
* Include notice banner block in the notice selectors
* Add inline documentation to role attribute removal
---------
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Cache block asset resource hints
* Combine resource hints under single cache transient
* Add AssetController tests
* Add changelog entry
* Skip cache use in development mode
* Fix up lint errors
* Revert init method back to protected and ignore linting
Co-authored-by: Mike Jolley <mike.jolley@me.com>
---------
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Fix: Use prepared statements for stock status filtering
This commit addresses an issue where the "Filter by stock" block fails when used with MySQL that has ANSI_QUOTES enabled. The problem was caused
by the use of double quotes in the SQL query.
Key changes:
1. Replace direct string concatenation with wpdb->prepare()
2. Use placeholders for stock status values in the IN clause
3. Validate stock statuses against known options before querying
This fix ensures compatibility with different MySQL configurations and improves
the overall security of the query by preventing SQL injection vulnerabilities.
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint errors
* Fix lint issue
* Fix: Use single quotes for attribute taxonomy names in SQL query
- Addresses issue with Filter by Attribute block failing with ANSI_QUOTES enabled
- Prevents "Unknown column" errors for attribute names in SQL queries
* Fix: Use single quotes for SQL IN clauses
This commit addresses an issue where the Filter by Stock block fails when
the database has ANSI_QUOTES enabled. The problem was caused by the use of
double quotes in SQL IN clauses, which are treated as identifiers when
ANSI_QUOTES is enabled.
The fix involves replacing double quotes with single quotes in the following files:
1. plugins/woocommerce/src/Blocks/QueryFilters.php
2. plugins/woocommerce/src/StoreApi/Utilities/ProductQuery.php
This change ensures compatibility with databases that have ANSI_QUOTES
enabled, while maintaining the existing functionality for other configurations.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add new email for notifying customers when an order fails
* Remove references to the order completed template and bump versions
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint
* Improve default subject and heading
* Remove the additional content message
* Update copy for both emails
* Cart Link Block WIP
* Add pattern for header
* changelog
* We added a header so update test
* Add wc-blocks-header-pattern class
* render_woocommerce_template_part was missing wrappers
* Add missing class
* Update plugins/woocommerce/src/Blocks/BlockTypes/CartLink.php
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Update plugins/woocommerce/src/Blocks/BlockTypes/CartLink.php
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Update plugins/woocommerce/src/Blocks/BlockTypes/CartLink.php
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Further SVG compression
* Remove unnecessary area handling
* Shared icon with mini cart
* Global style support
---------
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
* Update composer.json to include 'assets' folder and exclude client in makepot-audit command
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove product filters template part
* Remove product filters overlay template part
* Update e2e tests
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix linting
* Remove unused template part class and remove overlay navigation
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update .distignore file to exclude ./client/admin folder from zip
* Add changefile(s) from automation for the following project(s): woocommerce
* Update .distignore
* Exclude /client/admin/ folder from zip in .distignore
---------
Co-authored-by: github-actions <github-actions@github.com>
* Prevent accessing unexisting context in Product Collection
* Add changelog
* Remove unnecessary OR
* Change the approach to cleaner one
* Improve the condition
* Fix product base incorrectly flagging as store pages on pages with same prefix
* Changelog
* Remove unused code
* Lint
* Lint
* Slightly moved some codes, improved comments, added extensive examples
* create HPOS tables if do not exist when enabling compat mode
* Add changefile(s) from automation for the following project(s): woocommerce
* remove undefined variable from log
* add newline
---------
Co-authored-by: github-actions <github-actions@github.com>
* check for empty order key
* reverse flow
* Update class-wc-order-data-store-cpt.php
* tabs to spaces
* Add changefile(s) from automation for the following project(s): woocommerce
* spaces to tabs
* fix lint issue - 477 | ERROR | Whitespace found at end of line
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
In this PR, we introduce and integrate a new webpack plugin, which hooks into `fork-ts-checker-webpack-plugin` and turns the specified TypeScript error codes into warnings to enable React 18 migration.
* Revert "CYS - Move the `private/patterns` endpoint to woocommerce admin API (#50400)"
This reverts commit 091141218e.
* Revert "CYS - Move the `ai/products` endpoint to woocommerce admin API (#50396)"
This reverts commit ae6f7837b2.
* fix endpoint
* Add changefile(s) from automation for the following project(s): woocommerce
* fix e2e test
* add declare strict type declaration
* Add strict_types to Products route class file
* Remove old TODO comment
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* moved files
* changed paths
* changelogs
* added eslintignore for admin subfolder as it has its own eslint command
---------
Co-authored-by: rjchow <me@rjchow.com>
* Add To Cart Form: Improve the default style and add the Stepper style
* fix height button when no variation is selected
* not allow the user to set 0 as value of the input
* format css
* fix padding
* format css
* fix CSS
* unset margin to align with the button
* Fix quantity stepper layout
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* improve layout editor side
* remove not necessary changelog
* improve escaping
* fix webpack configuration
* add E2E tests
---------
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
* Replace `@media (width <= $breakpoint-medium)` queries with `@media screen and (max-width: $breakpoint-medium)`. iOS Simulator doesn't seem to support the previous query syntax.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Ignore payment gateway suggestion ID variation part
When searching for the current gateway ID we will ignore the
part after :.
* Use a connect link when no WCPay account connected
This allows us more control over where to direct the user.
* Use the individual payment gateway enablement flow for WCPay
* Add changelog
* Add changelog
* Fix lint errors
* Prevent recalling installAndActivate when autoinstalling
If we have installAndActivate as a dependency, when isRequesting becomes false
it will cause a second, needless installAndActivate call and we end up with two
snackbar notices about plugins being installed and/or activated.
* Replace deprecated Button props
* Make the plugins installed&activated notice message more informative
* Fix object check
* Add changelog
* Remove WooPayments task item fill and use standard task item
* refact: Separate get suggestion
* Provide WCPay task action from PHP
* Don't point directly to WCPay pages, use connect links instead
* Remove WCPay action URL logic from the main Payments task
If WooPayments is supported, the dedicated task will superseed
the default payments task. There is no need to have special action
URLs.
* Lint fixes
* Use a WCPay connect link to defer to the client logic
* Fix WCPay task link when incentive is available
* Lint fixes
* Cache block pattern data to optimize pattern registration
* Add tests around block pattern registration
* Test cached block pattern registration
* Add tests around invalid cached data
* Remove unused mock package
* Add changelog entry
* Fix up linting issues
* Bump transient time up to one month
* Sample test
* Jest tests
* Fix spinner
* Add e2e test to check registration works
* Classes were renamed
* wc-block-order-confirmation--create-account-button remove double hyphen
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* woocommerce-blocks-test-enable-experimental-features
---------
Co-authored-by: github-actions <github-actions@github.com>
* Skip flaky tests for now
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove best selling filter option
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Add tiebreak fallback in case total_sales is 0 which prevents random order
* Remove test_merging_order_by_popularity_queries as it is not needed
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix clearing search input in In-App Marketplace
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* ../woocommerce-admin/client/customize-store/transitional/index.tsx
* Delete plugins/woocommerce/bin/composer/phpcs/composer.lock
* Add changefile(s) from automation for the following project(s): woocommerce
* Delete plugins/woocommerce/bin/composer/phpunit/composer.lock
* Delete plugins/woocommerce/composer.lock
* Reverted the changes
* Reverted the changes
* Reverted the changes
* Reverted the changes
* Reverted the changes
* Reverted the changes
* Reverted the changes
* Implemented Suggested Changes
* Implemented Suggested Changes
* IMplemented the Suggestions
* Removed navigateOrParent as it is not needed.
* Updated test case in index.test.tsx
* Revert the change
* Implemented suggestions
* Update transitional.spec.js
* Update transitional.spec.js
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Co-authored-by: root <root@LAPTOP-I3Q9TGEL>
* Fix a bug in FeaturesController.
The UI for a non-legacy feature was showing up greyed out
("UI disabled") when the setting that controls the feature
was off ("feature disabled").
* Add the CostOfGoodsSoldController class.
* Add COGS related properties/methods to the product and variation classes.
Also update the data stores appropriately.
COGS values will be stored in a "_cogs_total_value" product meta key,
but only when the value is not zero.
For variations, a flag indicating if the COGS value overrides
the parent value will be stored in a "_cogs_value_overrides_parent"
product meta key, but only when the value is true (stored as "yes").
* Add filters to customize the COGS related data as it gets loaded or saved.
* Add COGS related functionality to the REST API
(get/create/modify products and variations endpoints).
* Modify product import file check to use the WP filesystem API.
Otherwise it doesn't work on environments that don't have
a direct filesystem like e.g. WordPress VIP.
* Add the FilesystemUtil::get_wp_filesystem_method_or_direct method
* Fix wrong type passed to `add_meta_boxes` action
* revert changed parameter of `do_meta_boxes` to `WP_Post` object
* Add `woocommerce_order_editor_add_meta_boxes` in order editor
* Move changelog entry to correct directory
* Populate `window.wcMarketplace` for Marketing > Coupons
* TEST CODE: Add promotions dummy data to the endpoint for now
See [this comment](https://github.com/Automattic/woocommerce.com/issues/21783#issuecomment-2376471712) as to how we plan to manage this through WCCOM
* Initial implementation of the `<PromoCard>` component
This commit does the following:
- Implement the `PromoCard` component
- Refactor the existing `Promotions` component
- Extract types
- Add support for conditional rendering based on `pathname`
- Accept optional parameter `promoCardOnly`
- Renders `PromoCard` wherever needed, as requested in the project thread.
Some remaining TODOs:
1. Dismiss functionality
2. Tracking
3. Figma design adjustments
- CSS styling (Flexbox in Marketplace, etc.)
- Percent image, wherever needed
- Background image
4. BWC testing (e.g. ensuring that "Get more for your money" banner still works)
* Make sure that WCCOM also returns path so that earlier versions of in-app marketplace don't break (path undefined error)
* Update T&C link
After https://github.com/Automattic/woocommerce.com/issues/21840
* Implement promo banner dismissal logic and tracks
* Styling the WooCommerce > Extensions version of the promo component.
- Tweaked data on `class-wc-admin-assets.php` to pass `style` and `icon` attributes for that promo.
- Moved promo on this page from the marketplace `Header` component to the `Content`, above the Sales Banner notices.
- Deleted `percent.svg` and moved its content into a React component.
- CSS tweaks for this style of promo.
- Changes to elements of `PromoCard` component to allow the layout for this style.
* Fixed some TypeScript issues.
- Added guard condition in case `promotion.id` is undefined.
- Returning null if it isn't - but below `useState` hook, so we conform to rules of hooks.
- Setting default value for `promotion.cta_label` to satisfy TypeScript, which expects a node.
Style tweaks to `.promo-cta`. Vertical centering of text, hover colour, margins.
* Remove unnecessary unique identifier for each promo, and use a smarter way (URIs) to gather the visibility data
* Lint
* Revert test code
* Changelog
* Better code comments
* Changed `promoCardOnly` attribute of `Promotions` to `format`, to allow for more types in future.
* Update plugins/woocommerce-admin/client/marketplace/components/promotions/promotions.tsx
Co-authored-by: Boro Sitnikovski <buritomath@gmail.com>
* Styling promo cards at different breakpoints.
Moved homescreen promo to after store management links.
* Added condition to merge array of promos with the main `$promotions` array.
* Added `useEffect` so we only record Track event for view of promotion once.
Changed Tracks prefix to the shorter `marketplace_promo_`.
* Added Tracks events for both formats of promotions, `promo-card`, and the original `notice`.
* Merging two style blocks.
* Passing `format` to `recordEvent` instead of hard-coding it.
* Addressing linter errors.
* Moved operation merging promos into the main array into a separate method for greater clarity.
* Moved Promotions component on WooCommerce > Home to below task list.
* Styling tweaks.
Increased schedule of `woocommerce_marketplace_cron_fetch_promotions` cron job to twice daily.
Added guard conditions in `Promotions` in case `window.wcMarketplace.promotions` isn't defined or isn't an array.
* Reduced SVG size to 72px.
* Fixing linter error.
* Style tweaks. Using WP components colour vars for CTA and dismiss links.
* Fixing linter error.
* Reverting change to `schedule_cron_event`, as this method will not be present if only this branch is cherry-picked.
---------
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Merge all listed /merchant files
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add a retry mechanism to the query to obtain the lock for inserting products in the API
* Add changefile(s) from automation for the following project(s): woocommerce
* Log errors after failed attempts and delay 10ms for each attempt
* Fix lint
---------
Co-authored-by: github-actions <github-actions@github.com>
* Notify wc/admin/options store changes after the data is saved in the server and not before
* Add changelog file
* Remove the subscription to the OPTIONS_STORE_NAME since its trigered many times, using useSelect instead
* Add changelog file
* Add order by sales filter option to product collection
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Replace __experimentalGetGlobalBlocksByName with stable getBlocksByName
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Skip `can remove a coupon` - error 500
* Make elements more specific
* Skip two tests from order-emails.spec.js
* Skip `WooCommerce Page Load`
* Expand WPCOM suite
* Change hardcoded email address
* Unskip tests in order-emails.spec.js
* Add changefile(s) from automation for the following project(s): woocommerce
* ESLint updates
* Check different locator for Marketing channels
* Skip "can receive completed email" for now
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add site_visibility_badge feature
* Update feature check on badge
Previously the WooCommerce Admin LYS feature flag was used, however this is slated to be removed in an upcoming release. This is updated to use the core level feature flag for the badge.
* Add changelog
* Fix lint issues
* Revert "Fix lint issues"
This reverts commit cf05d2b74f.
* Lint fixes
* lint
* Add missing classnames for WP blocks
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix unwanted extra whitespace within class property
* Remove unnecessary whitespace in class attribute for the Product Image block
* Remove unnecessary whitespace in class attribute for the Product Rating block
* Remove unnecessary whitespace in class attribute for the Product Rating blocks
* Fix php lint errors
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
* Handle notice if displayed
* Make `Reply to comment` more unique, and wait for comment area to disappear
* Skip on WPCOM - error 404
* Fix copy/paste error
* Make area more unique
* Add changefile(s) from automation for the following project(s): woocommerce
* Expand WPCOM suite
---------
Co-authored-by: github-actions <github-actions@github.com>
* Return empty string from template_include filter instead of null
* Update phpdoc return tag
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
In this PR, we are re-iterating the job speedup and leveraging single wp-instance, incremental builds, and baseline reports caching. The original benchmarking tool is still available but bypassed as we evaluate results for this iteration approach.
* Pass extra CSS classes to the block
* get className using wrapper method
* amends from CR
* remove not needed class
* Merge remote-tracking branch 'upstream/trunk' into fix/add-extra-css-classes-to-product-image
* add missing variables
* fix lint error
* add changelog
* remove not necessary code
* add extra_classses parameter
---------
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* Force block to be inserted after account summary
* Clean up block hooks
* Changelog
* Escape strings in default content
* Init $notice to prevent PHP notice
* Add aria-label for page numbers within pagination
* Add changelog
* Fix innerText to camel case format
* Update plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php
Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
* Add screen reader text to the page numbers in the pagination partial
* Fix linting spacing errors
* Fix linting space remaining
* Bump template on pagination template
* Update plugins/woocommerce/templates/loop/pagination.php
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
* Add aria-label to pagination numbers
* Improve logic to get current page number
* Rename $r parameter to $html
* Fix post-increment php lint error
* Account for two dots elements to add aria-label to page link
---------
Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Co-authored-by: Gabriel Manussakis <9420947+Manussakis@users.noreply.github.com>
Co-authored-by: Gabriel Manussakis <gabrielmanussakis@gmail.com>
* Remove underline from sale prices in WooCommerce block themes
* Add changefile(s) from automation for the following project(s): woocommerce
* Improve css properties
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add global_unique_id to Exporter
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* We are now using 16:9 images for themes in the in-app marketplace, so we need to change the image ratio.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* In-App Marketplace: hide subscriptions for maxed out connections
If we don't add this check, subscriptions with no connection allowances,
still show up in the "Available to Use" table. This can be misleading.
* In-App Marketplace: Fix My Subscriptions table row statuses
When there are multiple subscriptions for a product, we can't manage the
state between "installed" and "available to use". This commit separates
some of the functionality between the tables in the My Subscriptions
page.
1) Don't show "not connected" badge on the "available to use" table
2) Don't show the "update" button on the "available to use" table
We can't test the number two, because I noticed we no longer send the
verison number in the WCCOM endpoint
* Add changefile(s) from automation for the following project(s): woocommerce
* Marketplace: remove unused useEffect
---------
Co-authored-by: github-actions <github-actions@github.com>
* Make themes util compatible with ext env and unskip relevant tests
* Add theme activation in test helper apis and update util
* Fix whitespace lint issue
* Make the util compatible with local and external envs
* Rename to activate theme
* Add theme name empty check
* Simplify theme util and update relevant tests
* Remove only from the test
* Add missing brackets to the shopper test
* Include error handling to see failure on CI
* Include themes installation in the test setup
* Revert and refact util helper
* Fix WooCommerce Blocks storybook
* Add blocks storybook to main storybook
* Add post build for iframe.html
* Only add WooCommerce Blocks when building storybook
* Use manager file again and add blocks build for storybook build
* Add changelog
* Update CatalogSorting classname to include wp-block class
* Add wp-block class name to the product button block
* Add wp-block classname to the product average rating block
* Add changelog
* Update changelog
* Fix lint issues
* Preserve dash in Mongolia postcodes
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* [wcml-4848] Fixes for incorrect blocks in WC's refunds policy page
Closes#51618
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
In this PR we aim to reduce filesystem modification when copying assets into the core by splitting copy tasks in three (one per source package) and using rsync over remove/copy combo.
* Redirect to canonical product permalink
This ensures that if product permalinks are set to include the
%product_cat% replacement token, arbitrary values for that part of the
URL will redirect to the canonical product category value, rather than
successfully loading the single product page.
Fixes#24244
* phpcs exception
* Update plugins/woocommerce/changelog/fix-24244-custom-permalink
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* WC cleanup plugin
* Fix linter errors
* More linter fixes
* Clean up spacing
* File doc comment
* Remaining linter problems
* Linter warnings too. Sigh.
* Media cleanup, DB table cleanup, tax rate cleanup
* Exclude media files used in tests from cleanup
* Exclude media files regardless of extension
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Render coming-soon template content without header and footer if the current theme is not a fse
* Check for store pages only
* Add changefile(s) from automation for the following project(s): woocommerce
* Make sure get_the_block_template_html exist
* Lint fixes
* Lint fixes
* Lint fixes
---------
Co-authored-by: github-actions <github-actions@github.com>
* Refactor WooCommerce Helper class
This commit refactors the WooCommerce Helper class in the `class-wc-helper.php` file. The changes include:
- Updating the comparison operator from `==` to `===` in the `activate_plugin` condition.
- Renaming the `get_install_base_url` method to `get_woocommerce_com_base_url`.
- Adding a new `get_install_base_url` method that returns the base URL for the plugin auto installer.
These changes improve the readability and maintainability of the code.
* Refactor data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion
- Refactor the data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion to use a dynamic base URL for the data sources.
- Update the deprecated DATA_SOURCES constant to an empty array in each class.
- Add a new method get_data_sources() in each class to return the updated data sources with the dynamic base URL.
- Modify the constructor of each class to use the get_data_sources() method instead of the deprecated DATA_SOURCES constant.
* Add changelog
* Add set-woocom-base-url tool
* Add changelog
* Rename woo_com and woocom -> wccom
* Change to falsy check !url
* Change woocom/WOOCOM to wccom/WCCOM
* Change default value to https://woocommerce.com/
---------
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Resolved fatal error when applying Brands-restricted coupon
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update heading for Hand-Picked collection
- Added 'recommend' to the keywords array.
- Changed heading content from 'Hand-Picked' to 'Recommended products'.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
In this PR, we aim to improve the speed of ppm installs by making changes in ppm configuration and post-install hooks. The main principle behind the changes is to leverage the identified parallelization potential.
* Fixed Fatal error call to a member function is_empty() in mini-cart.php:24
* Updated Template Version
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Only register block assets on the frontend during block render
* Add changelog entry
* Add wc-blocks-registry as a dependency to product collection tester script
* Update docs manifest
* darker outline and double outline on focus
* flip outlines for shipping selector
* fix select outline in dark mode
* Fix input labels being cut off due to line height
* adjust outline colors
* fix rest of problems in dark mode
* fix express payment on checkout
* Fix broken styles for shipping cart in medium
* Always center input label
* Fix order note background in dark mode
* remove empty space in payment methods when there's no content inside
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* fix linter issues
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add styling for dataviews with old nav
* Add toggle to toggle between new and old navigation
* Update dataviews dependency
* Fix width for list view
* Remove unused type
* Add changelogs
* Fix: Prevent adding hidden input to external product forms with URLs
This commit addresses an issue where a hidden input field was being added
unnecessarily to external product forms that already have a URL. The changes
include:
1. Adding a check to determine if the product is an external product with a URL.
2. Only adding the hidden input field for products that are not external
products with URLs.
This fix ensures that external product forms with URLs maintain their intended
functionality without the addition of unnecessary form elements.
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint issue
---------
Co-authored-by: github-actions <github-actions@github.com>
* Reverse the dependency on drawing sparklines in the legacy reports from the WooCommerce Status widget on the dashboard page.
* Add a new class to simulate the loading plugin for the legacy reports.
* Decouple the dependency between the legacy reports and the WooCommerce Status widget on the dashboard page.
* Break down the method of forming HTML for the sparkline in Dashboard widget to avoid directly outputting HTML via a filtered callback.
* Update PHP unit tests for WC_Tests_Admin_Dashboard.
* Add changelog.
* Ensure the backward compatibility for the `woocommerce_after_dashboard_status_widget ` action.
Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768751063
* Fix the incorrect indentation of a modified line of codes in the `WC_Admin_Dashboard` class.
Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768690182
* Fix a PHP 8 deprecation message due to a required parameter after an optional parameter in the `WC_Admin_Dashboard` class.
Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768776896
* Tweak the inaccurate PHPDoc for the `get_sales_sparkline ` method in the `WC_Admin_Report` class.
Address: https://github.com/woocommerce/woocommerce/pull/51566#discussion_r1768804777
* Refactor WooCommerce Helper class
This commit refactors the WooCommerce Helper class in the `class-wc-helper.php` file. The changes include:
- Updating the comparison operator from `==` to `===` in the `activate_plugin` condition.
- Renaming the `get_install_base_url` method to `get_woocommerce_com_base_url`.
- Adding a new `get_install_base_url` method that returns the base URL for the plugin auto installer.
These changes improve the readability and maintainability of the code.
* Refactor data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion
- Refactor the data source poller classes for marketing recommendations, payment gateway suggestions, shipping partner suggestions, inbox notifications, remote free extensions, and WooPayments promotion to use a dynamic base URL for the data sources.
- Update the deprecated DATA_SOURCES constant to an empty array in each class.
- Add a new method get_data_sources() in each class to return the updated data sources with the dynamic base URL.
- Modify the constructor of each class to use the get_data_sources() method instead of the deprecated DATA_SOURCES constant.
* Add changelog
* Introduce RadioControl
* Provide better copy and improve styling of radio button
* Implement the logic of choosing current product as a reference
* Add placeholder state in product chooser
* Add placeholder image to product chooser
* Add changelog
* Refactor file
* Improve the condition choosing the default radio value
* Update E2E tests
* Format SVG icon and optimize it
* Increase a gap in radio control
* Make the labels less spcific to related products
* Rename some variables to more meaningful names
* Show placeholder img if product doesnt have one
* Fix type
---------
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Fixed PHP 7.4 Compatibility
The splat operator does not support associative arrays until PHP 8.1.
* Added Related Products Collection Boilerplate
* Added `woocommerceRelatedTo` Collection Parameter
This parameter allows the block to query for products that are related
to the given product IDs.
* Added Collection Related Product Filter
Using `woocommerceRelatedTo`, queries may restrict the products returned
to those that are related to the given product ID(s).
* Removed Unnecessary Tracking
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Removing Misunderstood Option
* Linting Fix
* Fixed Test
* Initialize the Hand-Picked collection
* Removed Unnecessary Keyword
* Render the collection-specific control
* try removing for fixing gh syntax hl
* add back
* tweak icon render
* combine conditions for early return
* Remove timeFrame from the query
* Set control label per context
* Use primitives for the icon
* Hide 'order by' control for the Hand-Picked collection
* Support Unlimited `wc_get_related_products()`
This changes related product fetching so that `-1` will return all
related products. I also removed a second +10 offset that seems
to have been accidentally added eight years ago.
* Revert "Set control label per context"
This reverts commit cd537befbe.
* Update titles and description
* Enable sorting by entered order
* Removed `woocommerceRelatedTo` Param
Since we're going to use the collection name, we don't need
this functionality any longer.
* Simplified `post__in` Filtering
Since `merge_queries` was already using an intersection merge for
`post__in`, this second function is unnecessary. I've removed it
as well as refactored the merging logic.
* Pass Collection Name To Final Query
* Improve the query merging logic
* Added Custom Collection Handlers
Developers can register collections along with handlers that implement
the custom behavior.
* Removed Second Test Query Construction
As it was, `build_query_vars_from_query_block()` was triggering the
ProductCollection instance hooked into WordPress. After that, we
called `build_frontend_query()` on our test instance. This caused some
weird behavior in tests. As a result, however, the tax_query merge
test couldn't rely on the tax_query transformation done by WordPress.
* Added Related Product Collection Handlers
* Revert "Support Unlimited `wc_get_related_products()`"
This reverts commit 41c837202e.
* Fixed Preview Mode Query
It looks like we were checking the wrong place for the preview
state.
* Improve the query merging logic
* Fixed Test
* Updated Collection Heading
* Handle collection context / no results state
* Small cleanup
* Better Collection Test Teardown
Passing a callable back means that we can use variables in the
setUp and then the tearDown without any confusion.
* Removed Unnecessary Test Provider
* Fixed `$post__in` Merging
When the intersection is empty it was returning all products. This
makes it so that it returns nothing when there's no results.
* Set perPage to 0 and add Pagination block for better discoverability
* Improve empty state in Editor by providing meaningful instruction
* Make code more defensive
* Hide more filters in scope of handpicked through hideFilters API
* Fixed PHPDoc
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Hide Empty Related Product Collections
* Removed Duplicate Query Function
* Added Hand-Picked Collection Handler
* Revert changes to pnpm
* Improve comment for empty Hand-Picked collection
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix: Pagination not working on Frontend
Remove perPage and pages attributes from hand-picked collection
* Remove unused code
* Revert "Improve empty state in Editor by providing meaningful instruction"
This reverts commit 9ac5c20d5e.
* Do not apply layout styles for empty results
* Improve the wording on the empty results message
---------
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
* Fixed PHP 7.4 Compatibility
The splat operator does not support associative arrays until PHP 8.1.
* Added Related Products Collection Boilerplate
* Added `woocommerceRelatedTo` Collection Parameter
This parameter allows the block to query for products that are related
to the given product IDs.
* Added Collection Related Product Filter
Using `woocommerceRelatedTo`, queries may restrict the products returned
to those that are related to the given product ID(s).
* Removed Unnecessary Tracking
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Removing Misunderstood Option
* Linting Fix
* Fixed Test
* Removed Unnecessary Keyword
* Support Unlimited `wc_get_related_products()`
This changes related product fetching so that `-1` will return all
related products. I also removed a second +10 offset that seems
to have been accidentally added eight years ago.
* Removed `woocommerceRelatedTo` Param
Since we're going to use the collection name, we don't need
this functionality any longer.
* Simplified `post__in` Filtering
Since `merge_queries` was already using an intersection merge for
`post__in`, this second function is unnecessary. I've removed it
as well as refactored the merging logic.
* Pass Collection Name To Final Query
* Added Custom Collection Handlers
Developers can register collections along with handlers that implement
the custom behavior.
* Removed Second Test Query Construction
As it was, `build_query_vars_from_query_block()` was triggering the
ProductCollection instance hooked into WordPress. After that, we
called `build_frontend_query()` on our test instance. This caused some
weird behavior in tests. As a result, however, the tax_query merge
test couldn't rely on the tax_query transformation done by WordPress.
* Added Related Product Collection Handlers
* Revert "Support Unlimited `wc_get_related_products()`"
This reverts commit 41c837202e.
* Fixed Preview Mode Query
It looks like we were checking the wrong place for the preview
state.
* Fixed Test
* Updated Collection Heading
* Add Upsells collection definition
* Register Upsells
* Add collection handlers for Upsells
* Add changelog
* Remove on sale query param
* Better Collection Test Teardown
Passing a callable back means that we can use variables in the
setUp and then the tearDown without any confusion.
* Removed Unnecessary Test Provider
* Added Upsell Collection Unit Test
* Product ID Confidence Check
* Added Collection Product Reference
* Don't display Upsells collection if there's no upsells
* Change the Upsells collection heading
* Add Upsells supporting cart context
* Consume the cart productIds and display Upsells in there
* Fixed `$post__in` Merging
When the intersection is empty it was returning all products. This
makes it so that it returns nothing when there's no results.
* Fix lint
* Extract the variable
* Fix lint
---------
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Fixed PHP 7.4 Compatibility
The splat operator does not support associative arrays until PHP 8.1.
* Added Related Products Collection Boilerplate
* Added `woocommerceRelatedTo` Collection Parameter
This parameter allows the block to query for products that are related
to the given product IDs.
* Added Collection Related Product Filter
Using `woocommerceRelatedTo`, queries may restrict the products returned
to those that are related to the given product ID(s).
* Removed Unnecessary Tracking
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Removing Misunderstood Option
* Linting Fix
* Fixed Test
* Removed Unnecessary Keyword
* Support Unlimited `wc_get_related_products()`
This changes related product fetching so that `-1` will return all
related products. I also removed a second +10 offset that seems
to have been accidentally added eight years ago.
* Removed `woocommerceRelatedTo` Param
Since we're going to use the collection name, we don't need
this functionality any longer.
* Simplified `post__in` Filtering
Since `merge_queries` was already using an intersection merge for
`post__in`, this second function is unnecessary. I've removed it
as well as refactored the merging logic.
* Pass Collection Name To Final Query
* Added Custom Collection Handlers
Developers can register collections along with handlers that implement
the custom behavior.
* Removed Second Test Query Construction
As it was, `build_query_vars_from_query_block()` was triggering the
ProductCollection instance hooked into WordPress. After that, we
called `build_frontend_query()` on our test instance. This caused some
weird behavior in tests. As a result, however, the tax_query merge
test couldn't rely on the tax_query transformation done by WordPress.
* Added Related Product Collection Handlers
* Revert "Support Unlimited `wc_get_related_products()`"
This reverts commit 41c837202e.
* Fixed Preview Mode Query
It looks like we were checking the wrong place for the preview
state.
* Fixed Test
* Updated Collection Heading
* Better Collection Test Teardown
Passing a callable back means that we can use variables in the
setUp and then the tearDown without any confusion.
* Removed Unnecessary Test Provider
* Fixed `$post__in` Merging
When the intersection is empty it was returning all products. This
makes it so that it returns nothing when there's no results.
* Fixed PHPDoc
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Hide Empty Related Product Collections
* Fix lint issue
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
* Add screen reader text for ratings data on product cards
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* add regular price and sale price flag to product apis and types
* add sale price and screen reader text for prices on product cards
* fix typo on sale flag
* add regular price and sale price flag to product apis and types
* add sale price and screen reader text for prices on product cards
* fix typo on sale flag
* Changelog.
* address feedback on sale price VO text
---------
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Settings first pass
* New Settings UI
* Respect woocommerce_enable_delayed_account_creation at block level
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Check input exists
* Add new setting to tests
---------
Co-authored-by: github-actions <github-actions@github.com>
* Minor cleanup
* refact: Rename must_be_visible to is_incentive_visible for clarity
* refact: Rename register_payments_welcome_page to register_menu_and_page for clarity
* Don't show the incentive page if the user can't manage WC
* Introduce menu item when no incentive
* Don't recommend additional gateways when WCPay is present
* Render gateway suggestions on the WCPay task page, also
* Add changelog entry
* Remove short array syntax
* Lint fixes
* Simplify Payments task view logic
* Simplify WooPayments task view logic
* Improve WooPayments task complete logic
* WooPayments can't be connected or onboarded if it is not active
* refact: Rename private static method
* Improve logic to determine the Payments task slug by factoring in the extended task list also
* docs: Add details about our use of the Payments task logic
* Add type hint
* Do not recommend offline methods when WooPayments is supported
* On suggestion enablement redirect to the same task page
* Lint fixes
* test: Fix unit tests
* Maintain deprecated navigation logic
* Update form handling to work with automatically generated passwords
* Keep user logged in after password reset.
* Ignore comments for hooks in changed method
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Checkmark list style
---------
Co-authored-by: github-actions <github-actions@github.com>
* Marketplace: hide the scrollbar from the category selector
Also fixed some button gradient issues
* Marketplace: change scroll helper button cursor
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add customer id to orders and update test to look for proper title
* Add changelog
* Update my account open orders test and assign customer ID
* Fix linting issues
* Add final fix to the my account open order test
* Add customer order to test
* Add comment on the top of the file
* Add two more comments to the top of the file to avoid linting failure
* Revert changes made to response in test and orders
* Rename response to r in orders
* Remove unnecessary code from orders
* Move order creation to setup and update tests
* Include check for the order ID validation
* Relogic add customer order
* Rename test comment
* Update setup to create customer and config, readme, relevant tests
* Remove console log from the test
* Improve remote logging tool to simulate core error early in the request lifecycle before wp fully loaded
* Disable wp error handler when simulate_woocommerce_error
* Add new buttonAttributes API to style express checkout buttons coherently (#47899)
* Expose buttonAttributes to the express payment methods
* Add size and label attributes to the express checkout area
* Remove defaultHeight
* default button Label
* Remove the button label attribute
* Remove px from height
* Change large button height to 55px
* Load express checkout block with attributes
* Add toggle and borderRadius controls and remove getting border radius from the theme
* Remove extra border radius text
* Only pass buttonAttributes if toggled on
* Move express payment block attribute logic into a Provider
* Tidy up editor grid and parse attributes into context on frontend
* Add px to border-radius input
* Express payment methods not selectable
* Add a test
* lint fixes
* default button height is 48 not 4
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Update docs
* Add tests for express payment methods
* Center images within the express payment area in the editor
* Apply the buttonAttributes to the li container in the editor regardless of showButtonStyles
* Fix style issue
* fix linting
* fix lint again
* Update manifest
* Update docs manifest
* Resize images in editor
* lint fix
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Synchronise the express payment settings between the Cart & Checkout blocks (#50688)
* Add express payment methods to sidebar
* Only add extra props for express payment methods
* Update docs
* Make title, description and gatewayId types optional
* Update docs
* Fix types again and editor side
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* handle situation when no methods are active
* Update manifest
* Add express payment methods to inspector controls for express checkout block (#50983)
* Remove forced styles on the editor
* Remove the darkMode setting from the buttonAttributes API (#51109)
* Remove darkMode from the buttonAttributes API
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Accept supports declarations for express payment style controls + merchant ux improvements in the editor (#51296)
* Fix images in editor displaying weird
* Fix long express payment names breaking layout
* Default to uniform styles off
* Use heightControl for border radius and fix height for cart buttons
* Move formatting title and description to the config validation
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix linting
* Fix failing test
* Add back the 48px height for images in editor
* Fix linting again
* Update docs
* Update docs manifest
* Update docs to fix linting
* Add comment to test to better explain why we are expecting a console warning
* make strings translatable
* Sync cart & checkout directly without option
* Remove current styles
* Change the beta label
* Replace < and > with symbol references in docs
* Update docs manifest
* Increase padding of beta label
* fix linter issues
* change to using looger helper
* fix CSS
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* Skip top flaky tests
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
* Add search results count to the in-app marketplace (#51266)
* Add searchResults to context
* Use setSearchResults in Content
* Add ribbons to the tabs
* Changelog
* Use setState as the function name
* Only show ribbon counts when there's an active search
* Refactor how 'setSearchResultsCount' is used (h/t @mcliwanow)
* Don't populate initial search results
* Unify css styling
* Marketplace: bring back the loading state (#51342)
* Marketplace: bring back the loading state
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove in-app marketplace Search results tab and unify results into existing tabs (#51297)
* Remove search results component and any references to it
* Persist current tab for searching, or default to extensions if tab is not set
* Persist term when switching across tabs
* Lint
* When a search is initiated, fetch all categories to keep the tab counts up to date.
The necessary filtering to display data to the current screen will be performed on the frontend.
* Apply correct colors to the tabs, as per design
* Beyond query.term, also rely on isLoading so that search result counts don't jump
* Address an issue when the user searches for something that returns no results in the business services tab
* Changelog
* Addressed :)
* Change key to category
* Fix category filter being broken
Whenever a category is requested, we need to do an additional request with the category param being the current category (overriding extensions/theme/business services).
Ideally the backend API would make a distinction between type (theme/extension/business service) and category, but this hack should do for now.
* Lint
* Remove unused variables h/t @KokkieH
* Lint
* Revert "Lint"
This reverts commit 0b2d2dca6d.
* Actually fix lint without introducing infinite loop
Reproducible at http://localhost:8080/wp-admin/admin.php?page=wc-admin&term=payments&tab=extensions&path=%2Fextensions&category=customer-service
* Show category selector even if there are no results displayed
* Update comment to be less misleading
* Query isn't used here
* Update Marketplace search component (#51313)
* Update Search placeholder text
* Replace search component with one from @wordpress/components
* Make mobile search field font consistent with desktop
* Add changefile(s) from automation for the following project(s): woocommerce
* Handle import errors for SearchControl component
---------
Co-authored-by: github-actions <github-actions@github.com>
* Marketplace: update category selector (#51309)
* Marketplace: update category selector
Remove the dropdown on the desktop view and show all items, even if
overflowing. Added helper buttons to scroll to the right to show more.
* Add changefile(s) from automation for the following project(s): woocommerce
* Marketplace: remove category sroll helpers from tabindex
GitHub:
https://github.com/woocommerce/woocommerce/pull/51309/files#r1758448638
* Marketplace: Remove selectedTab reference from product.tsx
This is probably included due to the merge conflict
* Marketplace: tweak category scroll button narrower
---------
Co-authored-by: github-actions <github-actions@github.com>
* Lint
* Fix 2 lint errors
* Fix another lint error (useMemo) h/t @KokkieH
* Add load more button in-app (#51434)
* Add additional fields returned by search API to marketplace types
Ensure components have access to additional fields
* Add LoadMoreButton component
* Only render Load More button if there are additional pages of results
* Fetch and display next page of results in Load More button is clicked
* Simplify renderContent function to have less repetition
- Hide load more button while fetching results
* Improve loading of new products
- Ensure keyboard focus goes to first new product after Load More is clicked
* Add changefile(s) from automation for the following project(s): woocommerce
* Add blank line to separate sections
* Set category param based on current tab when loading more products
* Improve busy-state screen reader text
Co-authored-by: Boro Sitnikovski <buritomath@gmail.com>
* Add missing dependency
* Move getProductType() function to functions.tsx
- Do not show load more button if isLoading state is true
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Boro Sitnikovski <buritomath@gmail.com>
* Rework the values used with `setSearchResultsCount`
After https://github.com/Automattic/woocommerce.com/pull/21678/files we
get a `totalProducts` so we can re-use that.
Also remove setting the counts when paginating since we set them to the
total.
* Add search complete announcement h/t @KokkieH
* Show update count only if greater than 0 h/t @andfinally
* Switch to Extensions tab if on My subscriptions when searching
* yoda
---------
Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
* Skip "Restricted coupon management" - error 500
* Make `wooPatterns` element more specific
* Skip "Merchant can view a list of all customers" - more customers due to using existing website
* No LYS on WPCOM
* Dismiss notice if shown
* Expand WPCOM suite
* Click on `Canada`
* Click on `Canada`
* Be more specific about `Delete` button
* Add changefile(s) from automation for the following project(s): woocommerce
* Skip two more tests - WC patterns and block
* Remove usage of `networkidle`
* Handle notice if present with `addLocatorHandler`
* Fix ESLint issue
---------
Co-authored-by: github-actions <github-actions@github.com>
Modify API response tests to assert that expected key values are present.
This differs from earlier assertion which checks for exact equality. However the earlier assertion was brittle and would fail when a new property is added, for example in https://core.trac.wordpress.org/ticket/61739.
With this change, any addition to schema will not breaking existing API tests.
* Refactor remote logging in WooCommerce
This commit refactors the remote logging functionality in WooCommerce to improve its efficiency and flexibility.
- In the `class-woocommerce.php` file, the `context` array now includes a new key `remote-logging` to indicate whether the error should be logged remotely if remote logging is enabled.
- In the `RemoteLogger.php` file, the `file` key in the `context['error']` array is now assigned to the `$log_data` array, and then unset from the `context['error']` array.
- The `should_handle` method in the `RemoteLogger` class now checks for the presence of the `remote-logging` key in the `context` array. If it is not set or set to `false`, the log is ignored.
- The `RemoteLoggerTest.php` file includes new test cases to ensure that the `should_handle` method returns `false` when the `remote-logging` key is not present in the `context` array.
These changes improve the remote logging functionality in WooCommerce and make it more robust and efficient.
* Revert log format change
* Set remote-logging context to true in log remote event method
* Add changelog
* revert change
* revert change
* Updated Product attributes placeholder to e.g. length or weight
* Added Changelog
* Add changefile(s) from automation for the following project(s): woocommerce
* Delete changelog/51134-product-attribute-placeholder-update
* Add changefile(s) from automation for the following project(s): woocommerce
* Revise changelog.
* Add changefile(s) from automation for the following project(s): woocommerce
* Satisfy linter.
* Increase exactitude to reduce ambiguity levels.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Add locale from php
* Add changefile(s) from automation for the following project(s): woocommerce
* Return a full locale with language and region code
* Fix style
* Fix error
* Lint fixes
* Lint fixes
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fixed call to member function is_visible Fatal Error
* Implemented the suggestions
* Add changefile(s) from automation for the following project(s): woocommerce
* Updated the @version tag
* Promote 'comment' to actual changelog entry.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Move WooCommerce Brands into core
* Fix linting errors in brand-thumbnails.php
* More lint fixes for brand-thumbnails.php
* Fix lint issues in brand-description.php
* Fix lint errors for brand-thumbnails-description
* Lint errors: Fix taxonomy-product_brand
* Lint errors: fix taxonomy-product_brand
* Linting: Try adding a space between ignore command and docblock
* Another try to remove the lowercase file name error
* Another try removing lint error for lowercase files
* Lint errors: Fix brands-a-z.php
* More lint fixes for brands-a-z.php
* More lint fixes for brands-a-z.php
* Lint fixes: brand-description.php
* Another try fixing lint errors for brand-description.php
* Another try fixing lint errors for brand-description.php
* More fixes for brand-description.php
* Fix lint errors for Packages.php
* More fixes for Packages.php
* Linting fixes for Brands.php
* Added docblocks for WC_Widget_Brand_Thumbnails variables
* Add script to fix coding standards for files changed in branch
* Run autofix script for linting
* Lint fixes for class-wc-widget-brand-thumbnails.php
* More lint fixes for: class-wc-widget-brand-thumbnails.php
* More lint fixes for class-wc-widget-brand-thumbnails.php
* Lint fixes for class-wc-widget-brand-nav.php
* lint fixes: ignore docblocks
* Another try to fix missing docblocks
* Another try to fix missing docblocks
* Another try fixing missing docblocks
* Better messages for fix-branch.sh
* Fix lint errors in class-wc-widget-brand-description.php
* Fix linting errors in REST API and functions classes
* Fix linting issues in class-wc-brands.php
* More lint fixes for wc-brands.php
* More lint fixes for wc-brands.php
* Fix lint errors for wc-brands-coupons.php
* Fix lint errors for class-wc-brands-block-templates.php
* Fix linting errors for class-wc-brands-block-template-utils-duplicated.php
* Fix lint errors in class-wc-admin-brands.php
* More fixes in class-wc-admin-brands.php
* More class-wc-admin-brands.php
* More lint fixes for: class-wc-admin-brands.php
* More lint fixes for class-wc-admin-brands.php
* Transfer unit test
* Transfer e2e test
* Added specific versions to templates
* Added changelog
* Another try for HTML templates version
* Fix lint errors in test files
* More lint fixes
* Fix lint warnings
* Added brands to list of expected REST API fields
* More lint warning fixes
* More lint warning fixes
* Updated unit tests to include brands
* Remove whitespace
* Added declare( strict_types = 1); to all PHP files
* Added declare( strict_types = 1) to test file as well
* Fix: There must be exactly one blank line after the file comment
* Temporarily remove Brands e2e tests
* Move Brands blockified templates
* Remove script to fix lint errors in current branch
* Try removing pull-package-deps
* Bring back deps
* Commit pnpm-lock.yaml
* Add debug statements
* More debug statements
* Make regular expression more specific
* Make matches more specific
* Search only for PHP templates
* Bring back whitespace
* Remove unnecessary change
* Update pnpm-lock.yaml
* Change the way Brands files are included
* Include all files
* Prevent Brands assets from being double-enqueued
* Move Brands scripts handling into core
* Revert changes in the template-changes.ts script
* Use strict in_array
* Add scaffolding for Brands test
* Add more scaffolding for Brands tests
* Enhance e2e test by adding steps for creating a Brand
* Move Brands test to Playwright folder
* Added manifest
* Fix lint errors in tests
* Move Brands coupons test into core's coupons tests
* Fix linting error in tests
* Move all Brands initialization within the /Internal/Brands class
* Rename `$merged_packages` to `$merged_plugins`
* Add force disable method back
* Move Brands logic outside core files
* Rename admin styles
* Remove brands logic from core's admin class
* Roll back all changes in admin assets class
* Fix linting errors
* Move REST API logic to Brands main class
* Introduce an option to control whether the Brands package is enabled.
Prevent autoloader from loading classes already loaded by individual Packages.
Fix an issue with Brands admin styles.
* Bring back pnpm-lock
* Add comment
* Split long line into two
* Review default values for remote variant assignment
* Rename global functions and add polyfills for deprecated functions
* Bump versions
* Fix some lint errors
* More lint fixes
* Set woocommerce_remote_variant_assignment for Brands to be enabled for unit tests
* Replace reserved word class with class_name
* Another try to include Brands files in tests
* Remove Brands from REST API tests
* Skip Brands tests while Brands is behind a feature flag
* Lint fixes
* Remove empty line
* Added feature flag.
* Fix widgets form
* Fix lint errors for brand description widget
* Fix lint errors for brand description widget
* Fix lint errors
* Bump version
* Updated tooltips for Brands coupon restrictions to match core's
* Fix lint errors
* More lint fixes
* Add REST API v3 for Brands
---------
Co-authored-by: Walther Lalk <83255+dakota@users.noreply.github.com>
* Add missing wp-block-x classname to order confirmation blocks
* Use get_block_wrapper_attributes for store notices block
* Breadcrumbs and notices
* Changelog
* fix line height
* Support controlling address card from data store
* expand billing address on unsync
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* disable linter rule
* remove empty section
* remove used vars
---------
Co-authored-by: github-actions <github-actions@github.com>
* Set markdown rule about Multiple headings to check siblings only
* Change the doc to have same headings but not siblings as example
* Add changelog
* Update docs manifest
* Add /merchant tests to the WPCOM suite
* Skip "can manually add a variation" on WPCOM
* Skip "Coupon management" - API returns 500 on delete
* Resolve `wp-block-woocommerce-checkout-order-summary-block` on the first element
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Initial implementation of the missing product state
- Changed `getProductCollectionUIStateInEditor` to a hook `useProductCollectionUIState`.
- As we added logic to check if selected product reference is deleted which require making an API call. Therefore, I decided to use a hook.
- While making an API call to check if product reference is deleted, I decided to show spinner in the block.
- Introduced new UI state `DELETED_PRODUCT_REFERENCE` to handle the missing product state.
- Updated existing `ProductPicker` component to handle the new UI state.
- It's better to use existing component for the missing product state, as it already has all the required UI.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Use getEntityRecord to check if product exists and other improvements
* Remove console log
* Add E2E tests for deleted product reference in Product Collection block
This commit introduces new E2E tests to verify the behavior of the Product
Collection block when dealing with deleted product references. The changes
include:
1. New test suite in register-product-collection-tester.block_theme.spec.ts
2. Modification to product-collection.page.ts to support custom product selection
3. Minor update to utils.tsx to handle trashed products
These tests ensure that the Product Collection block correctly handles
scenarios where referenced products are deleted, trashed, or restored,
improving the overall reliability of the feature.
* Simplify product creation in Product Collection block test
* Refactor E2E test for delete product reference picker
1. Removing the unnecessary `test.describe` block for "Deleted product reference"
2. Eliminating the `beforeEach` hook that was creating a test product
3. Integrating the test product creation directly into the main test
This change simplifies the test structure and improves readability while
maintaining the same test coverage for the Product Collection block's
behavior when dealing with deleted or unavailable products.
* Simplify logic for product collection UI state
This commit simplifies the handling of the `usesReference` prop in the
Product Collection block:
1. In `edit/index.tsx`, directly pass `usesReference` to
`useProductCollectionUIState` hook without conditional spreading.
2. In `utils.tsx`, update the type definition of `usesReference` in the
`useProductCollectionUIState` hook to explicitly include `undefined`.
* Refactor Product Collection block to improve prop passing
- Introduce ProductCollectionContentProps type for better prop management
- Refactor Edit component to use a renderComponent function
- Update component prop types to use more specific props
- Remove unnecessary props from ProductCollectionEditComponentProps
- Simplify component rendering logic in Edit component
- Adjust ProductPicker to receive only required props
- Update imports and prop types in various files to use new types
This refactoring improves code organization and reduces prop drilling by
only passing necessary props to each component. It enhances maintainability
and readability of the Product Collection block and related components.
* Refactor Product Collection block editor UI state handling
This commit simplifies the rendering logic in the Product Collection block's
Edit component. It removes a redundant case for the VALID state, as both
VALID and VALID_WITH_PREVIEW states now render the same ProductCollectionContent
component. This change improves code maintainability and reduces duplication.
* Fix: isDeletedProductReference is not set correctly
* Use "page.reload" instead of "admin.page.reload"
* Separate PRODUCT_REFERENCE_PICKER and DELETED_PRODUCT_REFERENCE cases
This improves readability and maintainability of the switch statement.
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add use-wp-horizon feature flag
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add error handling when the call to 'install-url' endpoint fails
* Changelog
* Ignore any explicitly
* Move the function below to address lint
* Change 'Try again' to a href, suggesting to download and install manually
* Lint
* reset styles for panel button
* reset styles for address card edit and address line 2
* Update shipping selector buttons
* fix line height
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* remove extra styles no longer needed
* update styles to balance chevron and change to span
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
* Expand WPCOM suite
* Skip core-profiler.spec.js on WPCOM - no "Coming soon"
* Skip `Analytics-related tests` on WPCOM - different sums
* Skip `Marketing Overview page have relevant content` - no content on WPCOM
* Payment setup task - make Save button more unique
* Include more tests in playwright.config.js
* Skip `Store owner can skip the core profiler`
* Add changefile(s) from automation for the following project(s): woocommerce
* Make "Get paid" more unique
---------
Co-authored-by: github-actions <github-actions@github.com>
* update Mongolia postcode to be 5 digits instead of 6
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* update validation package and expand mongolia checks
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* update lock
* fix lock again
---------
Co-authored-by: github-actions <github-actions@github.com>
* In-App: make in-app header sticky
z-index: 1 is required to make sure the header appears above product
cards.
Also had to remove a parent `overflow: hidden` property. Apparently,
it's there to remove a second scrollbar. Upon removal, I didn't see
any double scrollbars, although it can be platform differences. Will
check it out in the PR review.
* Add changefile(s) from automation for the following project(s): woocommerce
* Update Change Your Store width for Marketplace search listing
Setting it 450px hardcoded causes overflows and breaks the layout.
See:
https://github.com/woocommerce/woocommerce/pull/51187#issuecomment-2344003169
* Move CYS tweak to the component
It was placed in the marketplace SCSS code previously. GitHub:
https://github.com/woocommerce/woocommerce/pull/51187#discussion_r1758381473
* Remove marketplace-specific styles from customize store banner
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
* Add focus styles for select
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
- Add a new notice to the plugins list for products used without subscriptions reminding them to purchase.
- Remove notices for expired and expiring subscriptions from WooCommerce settings screens.
- Change link for subscribe and renew to add the product directly to cart.
---------
Co-authored-by: github-actions <github-actions@github.com>
* In-App Marketplace: Record the legacy Tracks event for Discover page
Fixes#21486
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Prevent search request in the Extensions > My Subscriptions page
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Track data for font and color pairings including 'Create your own' option in CYS
* Add changelog file
* Track data for logo flow
* Send the open param as part of the tracking event customize_your_store_assembler_hub_color_palette_create_toggle
* Pressable - run only /api-tests
* Skip on Pressable
* Fix lint errors
* WPCOM - run API only
* Revert "WPCOM - run API only"
This reverts commit 5e59be1663.
* WPCOM - run API only
* Update settings-crud.test.js so they are passing against Pressable
* Skip "can retrieve all tax settings"
* Skip "can view all system status items" on WPCOM
* Several skips in settings-crud.test.js
* Skip "Product review tests: CRUD" on WPCOM
* Skip "List all products > categories" on WPCOM
* Skip "can view all payment gateways" on WPCOM
* Skip "Orders API tests" on WPCOM
* Skip "Customers API tests: CRUD" on WPCOM
* Revert `playwright.config.js` files and include '**/api-tests/**/*.test.js',
* Add changefile(s) from automation for the following project(s): woocommerce
* Skip three more API tests for WPCOM
* Skip two coupons tests
* Update report name for Pressable and WPCOM to ``*-core-e2e-and-api`
---------
Co-authored-by: github-actions <github-actions@github.com>
* add max-width and border raidus to footer container
- to make it look similar to design your own theme box
* remove marketplace copy from footer
* add another tab to footer
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* add feedback on code
---------
Co-authored-by: github-actions <github-actions@github.com>
* Make padding consistent for all type of card contents as 24px
* Add changefile(s) from automation for the following project(s): woocommerce
* override margin bottom added by woo payments plugin for product cards
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add block to templates
* Register block type with php
* Create block type class
* Update webpack
* Move password strength meter component
* Add button styles when disabled
* Move password strength component
* Block WIP
* CSRF token handling
* Put new block behind feature flag
* Add experimental flag docs
* Update icon + description
* Changelog
* Lint errors
* Style controls
* Adjust icon markup
* subsctring match
* More specific import
* Fix test fail caused by layout shift
* Wording changes from Figma
* Check if logged in, not just if the current email is registered
* Use opacity for disabled button text
* Sync order data with customer after account creation
* Add id/fragment to form