* 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>
In this PR, we update the skip strategy for ci-workflow to use the GitHub actions feature and simply filter out the changed paths (skip docs, changes).
* Implement order attribution install banner in analytics overview page
* Add a hook for setting banner dismissed option
* Use the hook the decide whether to show banner and call dismiss funtion
when clicking dismiss CTA
* Do not show banner when the plugin is already installed
* Add event tracking for banner viewed and clicked
* UI adjustments based on PR reviews
* Move client/order-attribution to client/order-attribution-install-banner
* Prevent the banner viewed event from being sent again wehn rerendering
* Add a comment to the hook useOrderAttributionInstallBanner
* Remove the prop of eventContext since it uses the default value
* Rename the css class name to make it more general
* Add a retry on the setup test environment step
* Minor change to an e2e test to trigger CI
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: github-actions <github-actions@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>