* 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>