This works fine:
```
curl -u bor0:asdf -X OPTIONS "localhost:8080/wp-json/wc/store/v1/products?_unstable_tax_asdf_operator=1" | jq
```
However, this causes a fatal error `PHP Fatal error: Uncaught TypeError: str_starts_with(): Argument #1 ($haystack) must be of type string, int given`:
```
curl -u bor0:asdf -X OPTIONS "localhost:8080/wp-json/wc/store/v1/products?1=2" | jq
```
* Add global_unique_id to importer controller
* Add changelog for gtin import mapper
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* init
* comment tweak
* changelog
* use gihub recommended method
* removed content write permission
* change in how to extract PR number
* change in how to extract PR number
* change in how to extract PR number
* regex change
* regex change
* template updates
* updated comments
* set global permission to empty and moved it within each job
* refactored code, created a needs step
* add condition to prep
* added acknowdegement section
* added github comment
* Moved variables to env
* PRR template
* PRR template changes
* Added changes to cfe notifications
* minor changes
* Added slack message sanitization
* PRR cherry-pick flow
* add cherry pick to frozen release label
* bug fix
* use js instead of shell
* use js instead of shell
* template updates
* frozen release as output
* added some comments
* pr base change
* pr base change
* descp change
* copy changes
* Added checkboxes conformation
* added ack section
* fixed bug
* fixed bug
* fixed bug
* typo
* bug fix
* bug fix
* added logic for github comment
* bug fix
* GH PR comment
* GH PR comment for CFE flow
* GH PR comment for CFE flow
* changelog
* In complechangelog step - extract version from branch
* add validation for manual version input
* log the version user entered
* log the version user entered
* rebased changes
* Code refactor
* bug fixes and formatting
* code refactor
* bug fixes
* template updates and using context object instead of parsing
* bug fixes
* renamed file
* moved vars to env
* Init
* comment tweak
* changelog
* use gihub recommended method
* removed content write permission
* change in how to extract PR number
* regex change
* template updates
* updated comments
* set global permission to empty and moved it within each job
* refactored code, created a needs step
* add condition to prep
* added acknowdegement section
* added github comment
* Moved variables to env
* review changes
* Add "Products" suffix to some collections name as they're being exposed in the inserter and had confusing names without Product Collection context
* Add changelog
* Update E2E tests
* Refactor coming soon banner styles and enqueueing
This commit refactors the styles for the coming soon banner in the WooCommerce plugin. The changes include:
- Moving the styles from the `woocommerce.scss` file to a new `coming-soon.scss` file.
- Updating the styles for the `#coming-soon-footer-banner` element.
- Adding a new class `.coming-soon-footer-banner__content` for the content inside the banner.
- Updating the styles for the dismiss button.
Additionally, the commit modifies the `ComingSoonRequestHandler.php` file to enqueue the new `coming-soon.css` file when the coming soon feature is enabled.
These changes improve the organization and maintainability of the code related to the coming soon banner and ensure that the correct styles are applied.
* Add changelog
* Fix styles
* Remove empty line
* Update check orders
* Add order reference to Upsells and Cross-sells
- Added 'order' to usesReference in cross-sells and upsells
- Updated LinkedProductControl for order context
- Enhanced ProductCollection to handle order references
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Add PHP code for Cross-sells collection
* Fix formatting
* Add E2E tests
1. In the Cart Template, it checks that "From products in the cart" is
selected by default for the "My Custom Collection - Cart Context".
2. In the Order Confirmation Template, it verifies that "From products
in the order" is chosen by default for the "My Custom Collection -
Order Context".
* Add 'block' scope to cross-sells collection
* Extract and use reference type constants
This commit extracts the REFERENCE_TYPE_CART and REFERENCE_TYPE_ORDER
constants to the top of the file and updates their usage throughout
the code, including in the getFromCurrentProductRadioLabel function.
* Align variable naming for product references in Product Collection
This commit updates the ProductCollection class to ensure consistency in
variable naming for product references across different collection types,
particularly aligning with the naming convention used in Upsells.
* Add "hadOrderReference" to conditional label display
Key changes:
- Removed `isUsesReferenceIncludesCart` parameter from `getFromCurrentProductRadioLabel`
- Introduced `hasCartReference` and `hasOrderReference` parameters for consistency
- Updated conditional logic to check for both cart and order references
- Adjusted the function call in `LinkedProductControl` to pass both new parameters
* Fallback to 0 for orderId in get_product_ids_from_order calls
---------
Co-authored-by: github-actions <github-actions@github.com>
* Rename Stock Status Filter to Status Filter
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix e2e test error
* fix php lint error
* Fix php lint errors
* fix php lint errors
* Update variable name to match the new block name
* Update block name
* Rename variables to match new block name
* fix import error
---------
Co-authored-by: github-actions <github-actions@github.com>
* add delayed account creation to WC_Tracker snapshot
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Use method title or gateway title in Checkout compatiblity notice
* use better conditions
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* feat: add support for SalePrice in JSON-LD schema for structured data
* Add changefile(s) from automation for the following project(s): woocommerce
* fix: phpcs issues
* feat: add SalePrice property to variable products on sale
* feat: use sale end date of lowest-priced variation for validThrough in schema
* refactor: simplify code
* fix: ensure that only sale prices are considered for the SalePrice property in variable products on sale
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add To Cart Form: hide stepper when product is sold individually
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* improve naming
* add comment
---------
Co-authored-by: github-actions <github-actions@github.com>
* Use createReduxStore instead of deprecated registerStore
* Move thunks to correct file
* Fix type definitions
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* changelog
* reduce diff size
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Remove todo
---------
Co-authored-by: github-actions <github-actions@github.com>
* add: tracks for skip guided setup
* moved recordSkipGuided setup to skip guided setup step
* lint
* moved it further
---------
Co-authored-by: rjchow <me@rjchow.com>
In this PR, we consolidate TypeScript config files (using the 'include' setting) and JS test directory naming. The goal is to reduce the number of processed files during different build steps.
* Avoid duplicate custom classnames
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Refactor wc_get_customer_default_location to ensure only valid countries are selected
* changelog
* MIssing doc block
* Updates tests
* Update test
* stripos usage
* Use isset for country check
To reduce wp-env startup crashes in CI, bump the ut's version to the latest and downgrade the MariaDB version used under the hood to 11.2. Related to https://github.com/WordPress/gutenberg/issues/62242, since it's addressed, we are good to remove the patch.
* Change e2e test to use plugin slugs instead
* Changelog
* Add data-slug in plugin screen, set remote variant for more predicability, change to use plugin slugs
* Update code to be clearer
* Add "Manual (menu order)" sorting option to Product Collection block
This change allows store owners to use their custom product order
(set in the WooCommerce admin panel) within the Product Collection block,
providing more flexibility in product listing.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Change order from DESC to ASC
* Add test for menu_order sorting in ProductCollection
This commit adds a new test case to verify the functionality of menu_order
sorting in the ProductCollection block. The test ensures that when the
'orderBy' attribute is set to 'menu_order' and the 'order' is set to 'asc',
the resulting merged query correctly includes these sorting parameters.
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add 'all products' keyword to Product Collection
* Hide All Products from inserter
* Add changelog
* Update test
* Update E2E tests
* Update E2E
* Fix the test by replacing All products with Product Collection
* [WC Tracker]: Track brands count
* Add changefile(s) from automation for the following project(s): woocommerce
* Handle case where the product_brand taxonomy doesn't exist.
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix: Upsells collection not showing correct products on frontend
This commit addresses an issue where the Upsells collection wasn't displaying the correct products on the frontend. The problem was caused by a variable name mismatch in the condition checking for empty product references.
* Add changefile(s) from automation for the following project(s): woocommerce
* Rename product_references variable for consistency
* Add support for linked products in cart context
This commit extends the LinkedProductControl component to support
linked products in the cart context. It introduces the following changes:
- Add a check for cart location alongside product location
- Introduce a dynamic label for the radio control option, which changes
based on whether the context is a product or cart
- Refactor the logic to determine when to show the radio control and
which option should be selected by default
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Refactor LinkedProductControl for improved clarity and flexibility
- Extract getFromCurrentProductRadioLabel function for better reusability
- Improve conditional logic for showing linked product control
- Enhance readability by using more descriptive variable names
- Simplify showLinkedProductControl calculation
* Refactor: Add constants for reference types in LinkedProductControl
* Rename variables in LinkedProductControl for clarity
- 'isUsesReferenceIncludesProduct' to 'hasProductReference'
- 'isUsesReferenceIncludesCart' to 'hasCartReference'
* Remove unused import
* Revert changes in ProductCollection.php
---------
Co-authored-by: github-actions <github-actions@github.com>
* fix Add To Cart form layout on post editor
* improve code
* fix conflict after merge
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* CYS: Remove GO_BACK_TO_HOME state from the Transitional screen
* Add changelog file
* Fix unit tests
* Redirect to the admin home page instead of the site home page
* Force billing email lowercase in store API validation routine
* Changelog
* Update plugins/woocommerce/changelog/fix-50329-store-api-email-restrictions-case
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
---------
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
* Associate shipping calculator button to its form in classic Cart
* Associate shipping calculator button to its form in block Cart
* Add changelog file
* Bump shipping-calculator template version
* Filter product collection variations by 'block' scope
This commit updates the product collection feature to only show variations
with the 'block' scope in the collection chooser. To achieve this:
1. Added 'block' to the scope array for various product collection variations
(best-sellers, featured, hand-picked, new arrivals, on-sale, related,
top-rated, and upsells).
2. Modified the collection chooser logic to filter variations based on the
'block' scope.
* Product Collection: Hide collection chooser toolbar for non-block scoped collections
This commit modifies the ToolbarControls component in the Product Collection block to conditionally render the CollectionChooserToolbar. The toolbar is now only displayed for collections with a scope that includes 'block'.
* Add scope property to product collections in E2E tests
This commit adds the 'scope' property to all registered product collections
in the E2E test plugin. The 'scope' is set to ['block'] for each collection.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Rename isShowCollectionChooserToolbar to showCollectionChooserToolbar
for better readability.
* Add documentation and refactor for product collection scope
This commit introduces the following changes:
1. Update documentation to explain the `scope` argument for product collections
2. Refactor Collection Chooser and toolbar controls to handle default scope
3. Remove explicit `scope` from test collections to align with default behavior
* Add E2E tests for Product Collection scope argument
This commit adds E2E tests to verify the behavior of Product Collections
registered with different scopes. It includes:
- Tests for collections with 'inserter' and 'block' scopes
- Verification of visibility in Collection Chooser
- Checks for 'Choose collection' button visibility
* Generate manifest file
* Generate manifest file
* docs: Remove unsupported emojis from product collection documentation
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add screen reader text to the gallery trigger link and update it to a button
* Fix linting error for line too long
* Fix linting double arrow alignment
* Update version
* Linting spacing fix
* Add a mixin for the product gallery trigger
* Move product gallery trigger to mixin and add a cursor state
* Remove unnecessary mixin import
* Add focus style to gallery trigger on TT1 theme
* Update gallery trigger mixin
* Update product gallery trigger markup
* Update changelog text
---------
Co-authored-by: Gabriel Manussakis <gabrielmanussakis@gmail.com>
Co-authored-by: Gabriel Manussakis <9420947+Manussakis@users.noreply.github.com>
* Fix: Upsells collection not showing correct products on frontend
This commit addresses an issue where the Upsells collection wasn't displaying the correct products on the frontend. The problem was caused by a variable name mismatch in the condition checking for empty product references.
* Add changefile(s) from automation for the following project(s): woocommerce
* Rename product_references variable for consistency
* Update variable name
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
* Hide preview label when a specific product is selected
This commit modifies the Product Collection block to hide the preview
label when a specific product is selected by the user. It addresses the
issue where the preview label was still showing even when a product
reference was available.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
This PR adds a new Payment status field to the order receipts.
* Adapt receipt to take into account failed orders
* Add missing param
* Add changefile(s) from automation for the following project(s): woocommerce
* Add a new section to show the order status
* Remove unused css
* Replace order status by payment status, possible values are only failed or success
* Change logic to use order failed instead of order paid
* Revert changes made to (HPOS) order editor meta box hooks (original change: PR#51598).
* Restore method param (was inadvertently stripped).
* Provide further explanation re types supplied via `add_meta_boxes`.
* Changelog.
* fix: dark theme support for "change address" cart button
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* 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>