Commit Graph

49687 Commits

Author SHA1 Message Date
Daniel W. Robert 8ee227f8df
Update Information Notice for No Products Found (#34362)
* Add additional class to no-products-found banner.

By adding an additional class of `woocommerce-no-products-found`, we can
target the info banner contextually without running the risk of
impacting notifictaions in other areas of the active theme.

See https://github.com/woocommerce/storefront/pull/2027#issuecomment-1218083764

* Add changelog for update.
2022-08-19 10:42:17 -05:00
louwie17 78c28ae9f3
Add product link field (#34313)
* Add initial product field and modal for editing product link

* Create a product link modal for editing product link

* Only show permalink when product is published

* Add changelogs

* Add changelog for data package

* Change save button to primary

* Fix merge conflcts

* Add getPermalinkParts selector to products store

* Made use of getPermalinkParts to support draft products
2022-08-19 12:05:13 -03:00
Vedanshu Jain c27565f413
Link backfilling to migration process (#34167)
* Link backfilling to migration process.

* Add changelog.

* Reduce batch size for backfilling since it is slower.

* Correct grammer.

* Link backfilling with data synchronizer and adopt with pending migration on both sides.

We already have backfilling implemented, however it was not linked. This would make switching data stores back to posts table not possible. This commit links datasynchronizer so that it can both migrate as well as backfill.

* Remove _recorded_sales from skipped check keys since its implemented.

* Share concrete instance of cot controller to share feature value.

* Revert adding concrete controller, object instance is already shared.

* remove yoda condition.

* Remove unintended change.

* Revert from using gmdate.

* Remove hardcoding.

* Remove doc block for fake option support.

* Comment out option check for better testability.
2022-08-19 06:27:19 -05:00
Barry Hughes 77d5842642
Restore 'Contributing to WooCommerce' guidance (#34380) 2022-08-18 10:41:17 -07:00
Joshua T Flowers e73ffbe088
Add FormSection component (#34348)
* Add FormSection component

* Add changelog entry

* Move card styling outside component

* Add readme

* Allow JSX elements for title and description

* Fix lint errors
2022-08-18 10:36:43 -07:00
Joshua T Flowers 32de8bee6f
Add SearchControl component (#34159)
* Add initial SearchControl component

* Add async example

* Reorganize getItemPropsType type

* Create separate MenuItem component

* Update items to use value/label pairs

* Add fuzzy matching example

* Use MenuItem component in example

* Add callback method example and onSelect prop

* Add custom render example

* Add styling

* Simplify Menu component

* Add changelog entry

* Update SelectControl to DeprecatedSelectControl

* Rename SearchControl to SelectControl

* Add readme

* Add placeholder prop

* Add icon to combox box

* Rename deprecated SelectControl classes

* Add changelog entries

* Pass menu props to menu to fix ref issues

* Update lock file

* Rebase and update lock file

* Fix up IDs in e2e tests

* Make list structure more semantic

* Fix update conflict with pnpm-lock

* Move new SelectControl to experimental

* Change experimental class name to avoid style conflicts

* Fix up latest lock file from rebase

* Remove onboarding e2e changes

* Update changelogs

* Update lock file again

* Update pnpm-lock and fix lint error

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-08-18 10:36:20 -07:00
Chi-Hsuan Huang e9d27c8949
Update in-app marketplace to display localized strings (#34356)
* Update in-app marketplace to display localized strings

* Add changelog
2022-08-18 16:51:36 +08:00
Chi-Hsuan Huang 50d4d6774c
Update "Refund Returns" note to display localized strings (#34352)
* Update WC_Notes_Refund_Returns note to display localized strings

* Fix wrong get_action return type

* Add changelog

* Add locale check and unit tests for wc-notes-refund-returns

* Update plugins/woocommerce/includes/admin/notes/class-wc-notes-refund-returns.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce/includes/admin/notes/class-wc-notes-refund-returns.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-08-18 15:37:52 +08:00
Alejandro López Ariza 64b0b2865e
Added new command to set up the local environment with COT enabled. (#34321)
* Added new command to set up the local environment with COT enabled.

* Removed new file added to e2e-environment, which we will no longer be using.

Co-authored-by: jamelreid <jnoelreid@gmail.com>
2022-08-18 08:49:20 +02:00
Chi-Hsuan Huang 6d96a6e4c1
Exclude asterisk from Country / Region translation string (#34368) 2022-08-18 12:17:13 +08:00
RJ e3d0558447
add: store address tour tracks (#34337)
Added tracks event for store address tour dismissal with schema:

'wcadmin_settings_store_address_tour_dismiss'
{
  source: 'done-btn' | 'close-btn',
  fields_filled: {
    address_1: boolean;
    address_2: boolean;
    city: boolean;
    postcode: boolean;
  }
}
2022-08-18 10:10:22 +08:00
Chi-Hsuan Huang 26a3d0d3c1
Update inbox notes to display localized strings when locale changed (#34038)
* Add a filter woocommerce_get_note to modify note before it is returned

* Make ChoosingTheme.get_note public so we can call it outside

* Implement the get_note filter to return localized strings

* Create get_actions method to reuse it in RemoteInboxNotificationsEngine

* Implement get_note filter in RemoteInboxNotificationsEngine to return localized note

* Add changelog

* Make GivingFeedbackNotes.get_note public so we can call it outside

* Check if note class has NOTE_NAME constant

* Update WooSubscriptionsNotes to show localized content

* Rename filter hook name

* Remove todo to pass php lint

* Update filter description

* Move locale check into individual filter functions

* Fix get_note_from_db logic

* Fix php lint errors

* Update the filter doc

* Add test for spec-runner.php

* Add tests for RemoteInboxNotificationsEngine

* Remove unneeded check

* Check if $note_from_class is instance of Note class

* Fix unit test
2022-08-18 09:53:40 +08:00
Paul Sealock 71f722942d
6.8 changelog: Copy from release branch into trunk (#34365)
update trunk with 6.8 changelog
2022-08-18 10:56:26 +12:00
nigeljamesstevenson 301c02a757
add tests for shipping zone regions (#34339)
* add tests for shipping zone regions

* add changelog file

* add changelog file

* update files to disable use of linting rules via .elintrc.js rather than .eslintrc

Co-authored-by: Greg <zhongruige@gmail.com>
2022-08-17 14:50:31 -06:00
Jamel Noel Reid b85819f2a9
Fix broken API tests (#34345)
* Bumped jest to v27

* Used jest in packaged node_modules

* Jest bump

* Removed puppeteer related code

* Updated CHANGELOG

* Added changelog
2022-08-17 11:04:41 -07:00
Néstor Soriano 5f257ed7d0
Fix inconsistent order total on checkout vs manual order page (#33812)
* fix: tax calculation and coupon sequence

* add phpunit skeleton

* Refactor calc_line_taxes and add_coupon_discount

The methods are moved to separate classes in src/Internal,
and two new "core" methods that exclude HTTP processing are added.

* The test partially passes now

* Final fix to unit tests, and fix remaining formatting issues

* Add changelog file

* Fix path to html-order-items.php

Co-authored-by: Siddharth Thevaril <siddharth.thevaril@gmail.com>
2022-08-17 14:56:28 +05:30
Ismael Martín Alabarce 115cac05de
Add WC Payments welcome page experiment (#34251)
* Show WCPay welcome page to all eligible merchants.

Remove the experiment and also check for marketplace suggestions.

* Update banner design and copy

Replace background `wcpay-banner.png` with `wcpay-offer.svg`, `flag.j` svg component with `gift.js`. Adjust styles and ensure it's responsive.

* Add more requirements.

Don't register it when there is an existing WCPay account or the site is on a WPCOM starter plan.

* Update promotion and FAQ copy

* Add the new experiment.

And remove the supported country check to use Explat instead.

* Add changelog entry

* Remove WPCOM starter plan check

* Remove Yoda comparisons

* Update `wcpay_exit_survey` event.

Record it also when the user chooses `Just remove` and use snake_case to avoid Track errors.

* Country and time conditions.

Only for US based businesses with a live store of at least 90 days.

* Update design and copy to match new requirements

* Update promo ID

* Fix country condition

* Load SVG as image instead of background

To prevent wrong asset generation due to Webpack configuration

* Fix WCPay installed condition

* Update promo ID

* Update promo ID in allowed notes

* Update FAQ copy

* Add `apply_filters` docblock

* Add missing `@since` to docblock comment
2022-08-17 17:11:51 +08:00
Rommel Castro 796c52018f
Add `wc com connect` command (#34073) 2022-08-17 10:21:16 +02:00
Paul Sealock 7a1048340e
Delete changelog files based on PR 34354 (#34355)
Delete changelog files for 34351
2022-08-17 18:33:04 +12:00
Chi-Hsuan Huang 02b47a67db
Migrate @woocommerce/data navigation store to TS (#34239)
* Migrate woo data navigation store to TS

* Add changelog

* Fix action type

* Update packages/js/data/src/navigation/reducer.ts

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Add a doc comment to MenuItem type

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-08-17 14:32:38 +08:00
RJ a6d656f363
fix: pinned wp/element to 4.8.0 until we sort out esm dependencies (#34349) 2022-08-17 12:09:00 +08:00
Chi-Hsuan Huang 64e14ebe7d
Enhance/34244 update data source poller for i18n (#34247)
* Update data source poller for i18n

* Update unit test

* Remove unnecessary change_locale hook

* Fix payment-gateway-suggestions unit test
2022-08-17 12:06:46 +08:00
Ilyas Foo cd5ffed61b
Deploy payments banner in settings page (#34326)
* Deploy payments banner in settings page, updated tests

* Add track on banner CTA click

* Add test for track

* Changelog

* Fix unit tests
2022-08-17 11:33:24 +08:00
Moon 68985e3222
Fix: Smart shipping defaults bug (#34351)
* Do not create default shipping zones when a shipping zone already exists

* Add changelog

* Use woocommerce_admin_skipped_creating_default_shipping_zones to avoid triggering spotlight tour

* Set woocommerce_admin_reviewed_default_shipping_zones to yes to prevent spotlight tour for the existing shipping zones
2022-08-16 20:18:52 -07:00
Eric Jinks 3739c425ac
Remove WCPay Subscriptions offer page experiment code (#34317)
* Remove WCPay Subscriptions offer page experiment

This removes all code added in PR#32957 as experiment has ended.

(WooCommerce > Subscriptions admin menu item and empty state offer screen)

* Add changelog entry
2022-08-17 15:07:39 +12:00
Peter Fabian 82b95fb474
Remove PHP 8.1 warnings and errors (#34336)
* Make the php file valid

* Remove code that's no longer in PHP.

mysql_* functions were removed in PHP 7.0

* Remove deprecated setting.

This only helps detecting \r as end of line and that should only be used in old MacOS 9 which is 20 years old by now.

* Changelog

* Added compulsory file comment.

* Removed forgotten phpcs flag

* ...and more cleanup.
2022-08-16 10:22:53 -07:00
Jorge A. Torres ecec9eaa76
[COT] Respect status flags `show_in_admin_(all|status)_list` in orders list table (#34290)
* Implement filtering by status in list table

* Respect ‘show_in_admin_status_list’ in list table

* Display correct status name for ‘draft’ and ‘trash’ post statuses
2022-08-16 12:37:46 +02:00
Sam Seay f4595c6ed4
Fix a bug crashing wp-env 5.1.0 in CI (#34274)
* remove `core: null` from wpenv json config
* peg wp-env to 5.1.0
2022-08-16 13:21:52 +12:00
Chi-Hsuan Huang ed9cd231d2
Add unit tests for orders milestone note (#34295)
* Refactor OrderMilestones.php

* Add unit tests for Orders Milestones note

* Add changelog

* Update OrderMilestones.php

* Fix OrderMilestones.php
2022-08-16 08:42:11 +08:00
Chi-Hsuan Huang 71ffd2c548
Update "context" prop of task list click/view event (#34297)
* Update Update context prop of wcadmin_tasklist_/view event

* Add changelog
2022-08-16 08:41:59 +08:00
jonathansadowski d5538505dd
Update the cherry-pick workflow to not run for non-existent branches (#34325) 2022-08-15 16:00:14 -05:00
Jamel Noel Reid 40dbc1f924
Update CI to use wp-env for api, e2e and performance tests (#34311)
* Renamed e2e to e2e-legacy

* Moved e2e folder to tests/e2e

* Updated gitignore

* Updted init script to work with wp-env

* Updated readme

* Updated commands to match new test structure

* Updated workflow to work with new test structure

* Added changelog

* turned off alternate wp cron in test

* Fixed path to playwright config

* Renamed e2e to e2e-pw

* Renamed e2e-legacy to e2e

* Updated e2e-pw path

* Fixed workflow

* Fixed csv test

* Updated .gitignore

* Removed puppeteer specific step
2022-08-15 11:47:53 -07:00
Barry Hughes 7021d442bd
Clear post cache after updating menu order for products. (#34195) 2022-08-15 07:28:14 -07:00
Rommel Castro 2ab9398167
Add `wc com disconnect` command (#33999)
* extract `disconnect` function

* extract `is_site_connected` function

* add `wc com disconnect` command

* add changelog

* fix phpcs errors
2022-08-15 09:54:55 -03:00
Chi-Hsuan Huang de46baf8fc
Fix review shipping option task title (#34294)
* Fix Review Shipping Options Task title

* Add changelog

* Reformat by phpcbf
2022-08-15 17:41:12 +08:00
Adrian Duffell d6224d8a0c
Add Facebook Extension to Onboarding (#34303)
* Add facebook logo

* Add facebook to OBW

* Add pinterest to OBW

* Add changelog

* Revert "Add pinterest to OBW"

This reverts commit cd99fb296c.

* Update changelog

* Update facebook URL

* Switch the “alt” data

* Update manage url
2022-08-12 14:54:53 -07:00
Joshua T Flowers a98f0fef52
Add Media Uploader component (#34181)
* Add media uploader component

* Expand on mocked examples in storybook

* Add styling

* Move MediaUploder out of index

* Add changelog entry

* Handle PR feedback

* Add readme

* Fix missing media utils types

* Rebase and use variant instead of isSecondary for Button

* Fix up lock file

* Fix up lint errors
2022-08-12 12:58:25 -07:00
Joshua T Flowers 19853e1577
Add SortableList component (#34237)
* Add initial draggable list component

* Add changelog entry

* Add drag and drop index

* Add util for checking target drop index

* Add handle component

* Rename component to SortableList

* Use dragged list item for placeholder height

* Add onOrderChange prop to subscribde to updates

* Throttle the drag over event

* Add base styles

* Add utils tests

* Add component tests

* Export component

* Update changelog entry

* Add readme

* Escape pipe in readme
2022-08-12 11:45:26 -07:00
Roy Ho f171913c93
Change to use fetch depth 0 (#34288) 2022-08-12 13:42:08 -05:00
Jacob Sewell 46762dab29
Add SplitDropdown component (#34180)
* Early draft of SplitButton component.

* Changelog for SplitButton component.

* Rename SplitButton to SplitButtonDropdown, apply styles to address toggle button location/size, take primary button from children.

* Address button variant styles

* Rename 'Default' SplitButtonDropdown story to 'Secondary' for clarity.

* Add a SplitButtonDropdown story where the component is disabled.

* README for SplitButtonDropdown component.

* Add disabled prop to SplitButtonDropdown README.

* Add a SplitButtonDropdown story where some but not all actions are disabled.

* Restore PrimaryDisabled story for SplitButtonDropdown.

* Reorganize SplitButtonDropdown properties inheritance to allow both disabled and variant to apply to both the main and toggle buttons.

* Rename SplitButtonDropdown to SplitDropdown.

* Hardcode menuIcon and menuIconExpanded in SplitDropdown.

* Fix outdated stylesheet import for SplitDropdown.

* Update SplitDropdown changelog to new component name.

* Update variable names that reference Actions to Items.

* Hardcode expanded/collapsed toggle button icons without extraneous const declarations.

* Use classNames() helper fn for className concatenation.

* Increase width of SplitDropdown toggle button.

* Add a specific className to the root ButtonGroup element of SplitDropdown.

* Simple rendering test for SplitDropdown.

* For consistency, move Button text out of props in SplitDropdown README and story.

* SplitDropdown does not render a toggle button if there is nothing to put in the menu.

* Fix variant prop type declaration in SplitDropdown.

* Improve SplitDropdown test: remove snapshot, add toggle click.

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-08-12 12:47:39 -05:00
Peter Fabian 0f99bd4e8d
Fix/forgotten template version (#34308)
Corrected the template version.
2022-08-12 08:23:34 -07:00
Barry Hughes 1a4060d689
Fix/34271 unlimited results (#34289)
Support for unlimited ('-1') results in COT queries.
2022-08-12 08:22:32 -07:00
Fernando 4693e251f7
Add product name and checkboxes for Product details (#34214)
* Add product details

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/product-details-section.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/product-details-section.tsx

* Rename folder

* Fix help icon

* Fix form

* Removed useless `useState`

* Add `getCheckboxProps`

* Add params to getCheckboxProps

* Add recordEvent

* Rename event

* Add changelog

* Fix texts

* Remove Fragment

* Fix useState initial state

* Convert EnrichedLabel to TS

* Fix unknown value prop

* Rename event

* Move EnrichedLabel

* Fix js warning

* Add storybook

* Add readme

* Add components changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-12 10:47:54 -03:00
github-actions[bot] 3e7c2e52cd
Prepare Packages for Release (#34299)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: ilyasfoo <ilyasfoo@users.noreply.github.com>
2022-08-12 16:05:13 +08:00
RJ 6a95d3ee93
dev: move guided tours into consolidated folder (#34279)
* dev: moved shipping tour into guided tours folder

* dev: moved store address tour to guided-tour folder

* dev: updated imports for store address tour code move

* dev: move add-product-tour to guided-tours

* dev: update imports for add-product-tour code move
2022-08-12 09:49:18 +08:00
Roy Ho fc06be8296
Add flag to state it is in dev mode so tools are installed like phpun… (#34258)
Add flag to state it is in dev mode so tools are installed like phpunit closes #34158
2022-08-11 12:58:36 -07:00
Roy Ho aee35e368b
Remove concurrency check (#34286)
* Remove cancel concurrency

* Add unique number to group

* Remove concurrency check
2022-08-11 12:29:25 -07:00
Barry Hughes bc31065b8e
Filtering for the COT admin list table. (#33789)
* Column sorting for the COT admin list table.

* Add filter for easier extensibility.

* Implement date based filtering within the admin order list table.

* Implement customer-based filtering within admin order list table.

* Allow filtering down to no results, better management of http_referer state.

* Changelog.

* Bring up-to-date, fix some conflict resolution mis-steps.

* Address coding standards.

* Remove unused import.
2022-08-11 13:00:47 -03:00
louwie17 a498cc8280
Add product form buttons and specific product edit page (#34211)
* Add initial product form action buttons to form

* Add new edit page and allow for updating and creating products

* Move crud functions to helper hook to keep things seperated better

* Add changelog

* ADd package changelogs

* Add isPending selector to products store

* Fix trash screen showing up when deleting product and add loading indicators

* Add extra types to Product type

* Update track names and add product data to tracks

* Update track logic when product is published

* Remove the Image section for now, to prevent confusion as it is not ready yet

* Add tests for the product form actions

* Update copy for publish & duplicate

* Remove unused code

* Set window.location correctly with href

* Reset changes in pnpm lock

* Moved pending action variables to product helper and updated buttons to reflect new suggestions

* Fix backwards compabitibility issue with Form changes

* Add switch to draft button
2022-08-11 11:04:14 -03:00
RJ 046fb2100e
Dev: remove vscode typescript build task (#34278)
* dev: remove vscode tsc build task

* dev: remove .gitignore entry for vscode build task
2022-08-11 17:08:44 +08:00