* Update all js packages with minor/patch version changes
* Add changelog
* Fix packages/data types errors
* Update data/CHANGELOG.md
* Fix puppeteer version
* Fix packages/data > countries error types
* Make data key optional in RestApiError
* Rename route to payment gateway suggestions
* Create separate payment gateway suggestions controller
* Move payment gateway logic into feature class
* Merge payment gateway information into single source of truth
* Filter out WCPay client-side
* Fix up frontend
* Redirect to payment settings page on install
* Add test around showing installed gateways
* Remove check for marketplace suggestions at the endpoint level
* Fix up payment gateway conflicts after rebase
* Handle PR feedback
* Optimistically dismiss the payment gateway suggestions
* Add changelog entry
* Add square_image support for new API param
* Fixed lint error
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
* Use integers for menu page priority
In wordpress >= 6.0, the seventh parameter passed to add_menu_page() should be an integer representing menu position.
* Add changelog
* Fix Analytics & WcPayWelcomePage menu positions
* Install grapheme-splitter
* Support multi-characters Unicode letters for inbox html truncator
* Fix truncateRenderableHTML length compare
* Change note to immutable
* Add changelog
* Use hasChildNodes() to check if we should call truncateElement
* Add tests for truncate()
* Redirect customers back to the payment task page after enabling an offline payment
* Add changelog
* Make hasPlugins property boolean
* Remove unnecessary type checking
* Fix the comparison logic
* Allow the support of multiple task lists with overlapping tasks
* Add filter by task ids
* Revert getTaskListById call
* Fix notices
* Move prefix event to task and task list classes instead
* Fix track events and extended task list
* Fix php unit tests
* Remove the seperate task list classes as this was unnecessary.
* Fix tests
* Remove unneeded allowed-tasks
* Change onboarding task list redux store structure
* Add extra id for handling hidden param for experimental task lists
* Fix lint errors
* Fix forgotten change
* Add changelog
* Copied .tsconfig into ./client to enable ts checking
- Made sub-repos composite typescript packages where necessary
* Prevent tsc from transpiling ./client
- we use webpack for transpiling so no need for this
* Added tsc resolution path for @automattic/explat-client
- Seems like there's a type export issue (?) with @automattic/explat-client and @automattic/explat-client-react-helpers
- adding the node_modules/@automattic/explat-client path in tsconfig seems to help TS resolve this using the source .ts files
- found answer here: https://github.com/microsoft/TypeScript/issues/42873
- should figure out what's actually wrong with the type exports and fix that there instead
* Removed mandatory checking from webpack
- removed this for now as it will block all development until all type inconsistencies are fixed
- for now, run the optional ts:check task either in console or vscode for highlighting type errors
* Added vscode tasks for typescript checking
* Patch @automattic/explat-client-react-helpers
- this changes the installed code in node_modules (post-installation) for @automattic/explat-client-react-helpers so that it exports the necessary type interfaces required by us
- attempted unsuccessfully to override type exports using declare module
- not too sure how to fix this internally by other means
- have to investigate what fixes to propose to @automattic/explat-client-react-helpers team
* changed tests in ./client to use ts-jest instead of babel-jest
- rewrote jest config to use ts-jest instead of babel-jest
- set ts errors to warnings instead so that tests don't fail on type errors
- created new tsconfig for ./packages/js-tests so that build and ts-check are separate, as js-tests need to be built for commonjs
After the WooCommerce code was moved to 'plugins/woocommerce' many of
the internal links in the README files (links to other README files
or to code files) were broken. This commit fixes that.
The update functions in wc-update-functions.php run when WooCommerce
is updated from a previous version, but not when it's newly installed.
This commit adds a couple of comments explaining that.
* Make sure the free subscriptions does not show when cbd industry is selected
* Add changelog and fix productTypes not being defined
* Fix lint issue
* Fix lint error
* Add a modal to show when unsaved changes are detected
* Add functions to track value changes from the steps
* Warn unsaved changes for the store details
* Add styles for the unsaved modal
* Warn unsaved changes for the Industry
* Warn unsaved changes for the Product Types
* Warn unsaved changes for the Business Details
* Add changelog
* Add testing instructions.
* Sort array values before comparison
* Use only the array values to compare the diff
* Catch rejected promise on continue
* Set initial value to an empty object
* Fix failing tests
* Add psr-4 for the internal classes -- this is a temp. changes. We should remove it once we completely merge to the core
* Register class aliases
* Move WcPayPromotion classes to the internal
* Ignore namespace PHP CS issue
* Make features/WcPayPromotion internal
* Added src-internal directory for Automattic\WooCommerce\Internal\Admin namespace
* Moved src/Features/WcPayPromotion to src-internal/Admin/WcPayPromotion
* Add phpcs rules for src-internal
* Remove phpcs:ignoreFile
* Update letter case to make it PSR4 compatible
* Fix letter cases
* Move the alias array into the function
* Rename WcPayPromotion to WCPayPromotion (letter case update)
* Include src-internal
* Update letter case
* Make classes internal
* Update references
* Fix WC_ADMIN_ABSPATH path
* Add psr-4 for the internal classes -- this is a temp. changes. We should remove it once we completely merge to the core
* Register class aliases
* Move WcPayPromotion classes to the internal
* Ignore namespace PHP CS issue
* Make features/WcPayPromotion internal
* Added src-internal directory for Automattic\WooCommerce\Internal\Admin namespace
* Moved src/Features/WcPayPromotion to src-internal/Admin/WcPayPromotion
* Add phpcs rules for src-internal
* Remove phpcs:ignoreFile
* Update letter case to make it PSR4 compatible
* Fix letter cases
* Move the alias array into the function
* Rename WcPayPromotion to WCPayPromotion (letter case update)
* Include src-internal
* Update letter case
* Make src/Schedulers/* internal, except the SchedulerTraits
* Add @internal comment tag
* Clean up incorrect import
* Remove unused import
* Refactor `MerchantEmailNotifications`
* Rename `NotificationEmail`
* Add changelog
* Add folder `Notes` to `Internal`
* Moved folder and the namespace was renamed
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
The table creation and filling was happening in a data migration, but
data migrations only run when WooCommerce is upgraded, not on a
clean install. Also, the option for using the lookup table
wasn't being set after a clean install (when the table has been created
and is empty since there are no products yet).
As part of the fix the table is added to the list of WooCommerce
core tables, and thus it's covered by the "Verify base database tables"
tool.
* Add psr-4 for the internal classes -- this is a temp. changes. We should remove it once we completely merge to the core
* Register class aliases
* Move WcPayPromotion classes to the internal
* Ignore namespace PHP CS issue
* Make features/WcPayPromotion internal
* Added src-internal directory for Automattic\WooCommerce\Internal\Admin namespace
* Moved src/Features/WcPayPromotion to src-internal/Admin/WcPayPromotion
* Add phpcs rules for src-internal
* Remove phpcs:ignoreFile
* Update letter case to make it PSR4 compatible
* Fix letter cases
* Move the alias array into the function
* Rename WcPayPromotion to WCPayPromotion (letter case update)
* Include src-internal
* Update letter case
* Move src/Features/RemoteFreeExtensions to src-internal/Admin/RemoteFreeExtensions (https://github.com/woocommerce/woocommerce-admin/pull/8311)
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Two new tools are added in the Status - Tools section:
- "Abort the table regeneration" - this one shows up if a regeneration
process is in progress. Running it will remove the "regeneration
in progress" option and set the "regeneration aborted" flag, it also
removes any pending regeneration step scheduled action.
- "Resume the table regeneration" - this one resumes the regeneration
process by setting the "regeneration in progress" option, removing
the "regeneration aborted" option, and scheduling a new regeneration
step action.
* Add hook reference README
* update hook reference
* better
* changelog
* add pr number
* remove example
* add desc
* add stats
* jsdoc REPORTS_FILTER
* Category configs
* configs
* data
* dashboard
* dashboard charts
* save
* save
* save
* done with filters
* Add scope to slotFill docs
* data
* add all slotfills
* data
* Fix error when scope is not present, and make use of typedef imports
* Move chart and filter jsdoc definitions to the reports index file
* Update hook reference data.json
* Make use of import for filter typedef and address some typos
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
* Add tracks events for dashboard setup widget load and click
* Add status widget tracks
* Use data attributes to track current and total steps
* Add newline at EOF
* Remove errant console logs
- Rename DBUtils to DatabaseUtils, and register it in the DI container
(instead of having it just contain static methods)
- The tool for the custom orders tables has now two shapes:
"create tables" and "delete tables" (so no regeneration, migration...)
- Not yet used constants and methods from DataSynchronizer removed
- Added missing method comments
* Fix payments extensions displayed below the offline payments options
Add spaces back
* Add changelog
* Remove the snapshot test and update payment gateway render test
* Make sorting compare function as a helper function
* Add business-details step complete track
* Add changelog
* Update tab name and treat each tab as an individual step when trickering tracks
* Add comment
* Fix linting
* Remove unnecessary css selector
* Update goToNextStep param to make it less confusing
* Update jsdoc param
* Retrieve variation name from woocommerce_order_items for deleted products
* Remove test code
* Refactor to use wc_order_product_lookup table
* Identation fix
* Remove link if the variation/product has been deleted
* Add changelog
* Remove (deleted) suffix
* Add (Deleted) suffix in frontend
* First draft of CouponPageMoved::has_(unactioned|dismissed)_note() method changes to avoid get_notes().
* Add static function get_note_by_name( $note_name ) to Automattic\WooCommerce\Admin\Notes\Notes class.
* Use Notes::get_note_by_name() in Notes::get_note_status().
* Use new Notes::get_note_by_name() in CouponPageMoved::has_unactioned_note().
* Use new Notes::get_note_by_name() in CouponPageMoved::has_dismissed_note().
* Add changelog for 7986/8202.
These are intended to improve the performance of the table querying
when there's a lot of products and attributes, see:
https://github.com/woocommerce/woocommerce/issues/31688
The indices will be created during the database migration to v6.3,
regardless of whether the lookup table already existed at that point
or not.
* Add payment_setup track for WooCommerce Payments
* Add WooCommerce Reset Plugin to E2E environment
* Add resetWoComerceState util
* Add state reset before obw test
* Refactor resetWooCommerceState
resetWooCommerceState now makes the HTTP request locally instead of from inside the browser context.
* Update reset functionality
* Add custom settings reset function for onboarding
* Update reset functionality
* Add action-scheduler run helper function
* Fix add section test
* Add plugin removal helper functions
* Fix lint errors
* Fix broken e2e tests
* Add changelog
* Remove unused imports
* Add comment for extra timeout
* Add helper function to wait until button stops moving, incase of animations
* Fix lint error
* Add variable for string used in multiple places
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Support woocommerce_explat_request_args filter to modify ExPlat request args
* Add ExPlat test
* Add ExPlat test for PHP
* Add changelog
* Add doc for the filter
* Fix syntax
* Fix country/region selection not preserved in store details task
* Update store-adress test cases
* Add changelog
* Check alphabets regx for isStateAbbreviation
* Update comments
* Use unknown type for locale
* Add Disable reason
* Override overflow rule for label in select controls in OBW store address inputs.
* Changelog for 7893/8186.
* Rather than specifically override the overflow for store addresss country/region, remove the specific rule that was causing the issue.
* Increase line-height on SelectControl label.
* Restore overflow: hidden rule for profile wizard control label.
* Update changelog for 7893/8186.
* Add package changelog entry for 7893/8186.
* Move plugin installation method to plugin helper
* Add hook to for note addition on install error to JP/WCS note
* Add install scheduler
* Add async request parameter
* Fix up scheduled action errors
* Add route to get installation status
* Add activation endpoints and helper async methods
* Fix errors in plugin activation
* Make job ID null by default
* Add async plugin tests
* Fix install activation error errant method
* Return error codes from API
* Us AS to retrieve jobs instead of transients
* Get plugin status data from AS actions
* Use job ID instead of action ID for scheduling activation
* Add generic activation and installation status endpoints
* Add changelog entry
* Hide store setup widget if user cannot manage woocommerce
* Use task list API to retrieve tasks
* Fix up URL and URL fragments from tasks
* Remove URL assertion on external API response
* Simplify task count and completed count test
* Update tests around widget visibility
* Update step number to be completed count +1
Recently a new admin notice has been added to warn users about the
upcoming PHP 7.2 requirement starting in Woo 6.5. For new installs
this was appearing together with the "recommended PHP 7.2" notice.
This commit removes the "recommended" notice if the new "required"
notice is already being displayed (unless the site is also using
an outdated WordPress version, which is also covered by the
"recommended" notice).
* Replace mysql image with mariadb
This fixes the missing architecture error raised by docker compose
* Update readme.txt
* Add changelog
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
- checkmarks in the stepper component go missing if the first checkmark is hidden
- happens because of html id collision between the checkmarks
- added some randomness to the mask ids
* Use __() to display a generic error message on sample item import rather than passing through the server message because it probably has tags.
* Add changelog for 4314/8173.
* Add support for __unstableHTML option to Snackbar.
* Use __unstableHTML option to display server-side error messages as they come in.
* Update changelog description for 4314/8173.
* Add payment_setup track for WooCommerce Payments
* Add timing props to tracks in onboarding when installing extensions
* Update extension key logic
* Add changelog
* Add tests for extension installation data for tracks
* Add util function for plugin slug parsing
* Only install and activate plugins that are not already active
After a regeneration of the product attributes lookup table finishes
successfully the table usage will be automatically enabled, except
if the regeneration was aborted via the deletion of the
woocommerce_attribute_lookup_regeneration_in_progress option.
* Combine all the .woocommerce-task-dashboard__container .woocommerce-task-card rules in one block.
* Move the .woocommerce-task-card__section-controls text-align center rule up in specificity so it overrides the rule in experimental-list.
Do we need the experimental-list package still?
* Changelog for 7174/8168.
* Expand button to container width and center text rather than centering the entire button in the ellipsis menu.
* Move ellipsis menu button style to _global so it applies, um, globally.
* Update changelog description for 7174/8186.
* Move ellipsis-menu popover button style to package from _global.
* Add components package changelog for Dismiss button in Unreleased section.
- Add the src/Internal/DataStores/Orders, with the appropriate
class files.
- Add an entry in the tools page to initiate the (re)generation
of the table data (does nothing for now).
- Add a new data store class (empty for now).
* Reduce padding around plugin list titles for marketing tools page.
* Changelog for 8164/8171.
* Update plugin list title padding
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Updated frontend email validation to use @wordpress/url
- added testing for StoreDetails
- changed basic email validation to use @wordpress/url isEmail
* Support i18n texts for report chart
* Add changelogs
* Add d3-time-format to date pkg devDependencies
* Fix date php format and add tests
* Add date changelog
* Fix date test
* Escape week of string for php formatter
* Add defaultDateRange argument to getAllowedIntervalsForQuery function for default period value
* Fix incorrect date options when the "Default Date Range" is set
* Add changelog
This commit reverts the deprecation if `is_ajax` that occurred in #31113. It leaves beind the changes to use the native function `wp_doing_ajax` instead.
Add a new filter: woocommerce_attribute_lookup_regeneration_step_size,
it allows to choose how many products will be processed on each
step when the product attributes lookup table is being regenerated,
the default is the previous fixed value, 10.
Also when the regeneration is manually aborted (via deleting the
woocommerce_attribute_lookup_regeneration_in_progress option), the
products - advanced settings section will still allow to enable the
usage of the table, but a warning will be shown because the table
will be in an inconsistent state.
* Fix bin/install-wp-tests.sh for wc >= 6.0.0
* Fix php unit test "test_deleted_coupons" for wc >= 6.1.0
* Update WC_Tests_Reports_Coupons test_populate_and_query test
Fix test
* If applied, this commit will format Line items price in order api
When buying three products at price is 17.17. request /wp-json/wc/v3/orders api will get line_items prices is 17.169999999999998, this is because floating point numbers have limited precision.
* use wc_format_decimal function format line item price on order api
* Use locale labels for store info
* Get address validation errors based on locale
* Fix validation rules based on locale
* Fix up store address in location task step
* Add changelog entry
* Should accept a boolean value for is_visible property with an extension, and only evaluate a set of rules
* Adding changelog
* Moving fix to RuleEvaluator so it applies to other rulesets
* OBW: Move newsletter signup checkbox inside the same Card as the rest of the Store Details form inputs.
* Add changelog entry for 8033/8148.
* Fix changelog format for 8033/8148.
Per the code comment, we were already explicitly assuming draft posts
are "pending". That's fine and shouldn't block us from setting new posts
to auto-draft.
For some operations in the API, like calculating taxes or shipping, it's
helpful to be able to have an order saved in the database. Having an
order object with an ID lets us perform other API actions on that order.
However, we also don't necessarily want these to show up on certain
screens.
Here we adopt the auto-draft status from core WordPress as a way to save
an order as a discrete object while signalling that it's not ready to
action yet.
Suggestions:
* auto-draft might not make sense given that it's used in core. We might
want to use something like `draft` instead.
* We may want to track this separate set of statuses (trash, auto-draft)
in a more official way, so we don't have to copy/paste around the
codebase.
Oops. We can't call $this->prepare_objects_query() unconditionally inside
prepare_objects_query(). This was my fault 🙃b43af2ae16
To explicitly reference the parent implementation, we use `parent::`
* Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083)
* Add wc-pay-welcome-screen flags
* Add wc pay welcome page from wc calpyso bridge
* Add changelog
* Rename var to pageViewTimestamp to prevent confusion
* Remove unused code
* Make sure hasViewedWelcomePage is a boolean value
* Simplify storeViewWelcome
* Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085)
* Add payments remind me later note
Fix wcpay path
* Add changelogs
* Update src/Notes/PaymentsRemindMeLater.php
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Fix possibly_add_note syntax error
Update Events.php
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101)
* Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104)
* Activate promo after wcpay is a\ctivated
* Add changelogs
* Add experimental to promo API path and limit the promo names
* Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115)
* Check ExPlat to render the menu conditionally
* Update the experiment name
* Fix letter case to follow feature class naming convention
* Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124)
* Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com
* Missed wc_calypso_bridge_payments_dismissed rename
* Use the existing code to prevent duplication
* Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141)
* Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142)
* Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143)
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
* Replace deprecated wc-admin-settings package
Co-authored-by: Moon <moon.kyong@automattic.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* 2022 theme stylings for product and shop pages.
* Add support for variable products and gallery.
* Add margin to reset button.
* Add support grouped product.
* Disable breadcrumb and add notice styling child.
* Reduce heading size on title page.
* Reduce font-size for content in tabs.
* Fixes for PR 31536 (#31611)
* Set max width to 1000px for shop and products.
* Display breadcrumbs on product pages.
* Remove admin styles.
* Fix result count and ordering control alignment.
* Fix onsale alignment on single product pages.
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
* Avoid unnecessary customer ID retrieval.
* Ignore order count when validating customers.
WC_Customer::get_order_count causes a full table scan without cache.
* Don't get customer names from their last order.
WC_Customer::get_last_order has to scan all _customer_user meta rows.
* Add changelog entry.
* Fix changelog.
* Cache customer ID in Order override classes.
* Check all user roles.
* Added the status field to the GET Coupon(s) API endpoint
* Updated existing unit test for reading coupons from the db
* Updated tests for version 2&3 when fetching coupons
* Update plugins/woocommerce/includes/data-stores/class-wc-coupon-data-store-cpt.php
Co-authored-by: Josh Betz <j@joshbetz.com>
* Update plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-coupons-v2-controller.php
Co-authored-by: Josh Betz <j@joshbetz.com>
* Update plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-coupons-v2-controller.php
Co-authored-by: Josh Betz <j@joshbetz.com>
* Updated unit test for getters and setters
* Fix indentation
* Fix indentation.
Co-authored-by: Josh Betz <j@joshbetz.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
- Update the link to the announcement post
- Extend the notice text with "Your server is currently running an
older version of PHP, so this change will impact your store".
* Fix misaligned status column on order report
Add labelPositionToLeft prop to order-status component
Set labelPositionToLeft=true for <OrderStatus> on orders report table
Remove style import
* Add changelogs
Add changelogs
* Remove use of wc-admin-settings from packages
* Move getSetting to getAdminSetting and remove wc-admin-settings package
* Add changelog
* Update package.json and remove last use of wc-admin-settings
* Rename variables and remove unnecessary select calls in selective-extensions-bundle
* Invalidate getFreeExtensions resolution whenever country or industry
changed
* Fix grammar
* Add changelogs
* Hide extension list header if no plugins under the category
* Refactor variable naming and add missing hook deps
* Add changelogs
* Add tests for <ExtensionSection />
Gutenberg 12.1.0 has changed the convention for the directory paths from
`block-templates` and `block-template-parts` to `templates` and `parts`
respectively.
Previously, WooCommerce was checking whether block templates were
available, only in the `block-templates` directory.
This commit adds support for both older and newer naming conventions,
as well as parents and child themes.
Fixes#31518
Presumably the original author of this code intended to use true here
instead of '__return_true'; '__return_true' is commonly used with
add_filter() but it does not really make sense to use it here.
This was not really a bug because '__return_true' is a "truthy" value,
so the logic was working as intended; I am changing it to true just to
improve code readability.
* Add e2e tests for PR 7963
* Fix lint
* Verify the next screen is shown
* Simplifying product types step
* Add className to SelectControl
* Fix e2e test
* Removed not used dependency
* Add method `expandRecommendedBusinessFeatures`
* Fixed style selectors
* Add default value to `name`.
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Add style links to storybook preview head based on the env
Use *style.css or *style-rtl.css based on a env flag so we don't need to modify
the preview-head.html manully.
* Add npm run storybook-rtl
* Update the storybook-rtl command description
* Fix(select-control): fix label value alignment
Add padding to input value to have same algin space with input label.
fixed issue 7786
* Add changelogs
Fix changelog entry
Add changelogs
* Add SlotFill area to header
* Add activity panel fill
* Move activity panel to root client folder
* Move activity panel registration to its own folder
* Add navigation fill
* Add page title slotfill
* Slot fill the back button
* Move mobile banner to slot fill
* Fix navigation fill on embed pages
* Add changelog entry
* Allow order prop to header item fill
* Split header into before and after
* Fix header title gaps
* Fix nav and mobile app banner placement
* Fix display options import
* Only use last item for page header title fill
* Use function to pass fill props instead of bind
* Rename header slots
* Fix mobile banner dismissal check
* Fix up inbox panel rename
* Update task title in tests
* Fix up task status retrieval
add field key to 'woocommerce_checkout_required_field_notice' filter. Currently if we want to hook any field we can only hooked on field's label. This is not good because field can have duplicate label. And field label can hae many variation because of translations. We need to add field key to the filter so we can hook on it instead.
This is the behaviour that normally happens when a user updates version by version, but if the user skips several versions, db version and WC version could diverge.
* Add loading icon and disable continue until free extensions are loaded.
* Add changelog
* Only show dropdown when we have installable extensions listed
* Revert spinner addition and add loading to Continue button
* Add wait for dropdown to be enabled
The "Advanced" section in the product settings page exists only
if the product attributes lookup table exists. The table will
eventually exist for everybody, so a temporary check has been added.
When a filter by attribute widget was configured as OR, the query
to return the product counts was overfiltering and returning
less results than it should. It now works as in the case of not
using the lookup table.
* Query both actioned and unactioned notes
* Fix note title style issue when the component is rendered in the sidebar
* Add changelog
* Update changelog
* Adjust styling
* Fix lint error
* Simplify title style by using title class selector
* Add ellipsis menu and styling
* Add dismissed option to pseudo payment gateway
* Check if the suggested gateway has been dismissed
* Add visibility and transition rules
* Remove CSSTransition wrapper due to invalid tags
* Fix padding on ellipsis menu
* Add dismiss tracks event
* Add changelog entry
* Check dismissal of promotion server-side
* Make note title clickable
* Note title is clickable
* Updated styles to make title link look like H3
* Clicking title does not trigger busy state
* Add changelog
* Added a new update callback for 3.0 version to migrate is_read col from last_read user pref value
* Remove unnecessary comments
* Remove add column logic -- not needed as tables are updates during the bootstrap
* Remove column existence check
* Use the latest woocommerce_admin_activity_panel_inbox_last_read value
* Clean up woocommerce_admin_activity_panel_inbox_last_read after updating is_read
* Remove unnecessary var
* Update includes/wc-admin-update-functions.php
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Update test to use ms
* Use get_users() to get the latest meta value
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
The action for adding extra webhook options should pass in the webhook so that those that are extending the webhooks page can know which webhook is being edited.
PHP 7.x and 8.1 will throw a fatal error, thus causing the unit tests
suite to abruptly end, if a method from an implemented interface doesn't
fully match the signature as defined in the interface. In WooCommerce
that's the case for the classes that implement ArrayAccess: in
PHP 8.0+ these signatures have type hints and return types (as in
"offsetUnset( mixed $offset ):void" ) but the code in WooCommerce
doesn't. We can't just add the missing types to the signatures because
then the same error appears in PHP 7.x, in which there aren't
types in the method signatures of ArrayAccess.
The fix consists of adding the ReturnTypeWillChange attribute,
introduced in PHP 8.1, which instructs the runtime to not throw the
error. PHP 7.x doesn't support attributes, but in this case the
attribute declaration is seen as a comment.
See https://php.watch/versions/8.1/ReturnTypeWillChange
* Introduce a 320 char limit for inbox notes
* Extract truncateRenderableHTML to utils and use truncate from lodash to support word break
* Replace omission with blank so that lodash does not add ... at the end
* Add test cases for truncateRenderableHTML
* Add a test case with unicode string
* Add changelog
* Add a test case for preserving whole words
* add colombia states
* update label for state (colombia)
* change to english string
* fixes CLDR names, sorting
* sorting
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Until now the product attributes lookup table had to be created
and its usage had to be activated manually, via the tools page.
This commit does the following:
1. Remove the tools to create and delete the table
(but keeps the tool to regenerate the table data for one or for
all the products)
2. Creates a data migration that triggers the table creation and
filling (unless the table already existed) for Woo 6.1
3. After the migration finishes, activates the table usage for
product filtering (site admin can still disable it via
Settings - Products - Advanced)
As far as I can see, this count param is not really needed, but it will still be good to keep it updated in case its getting used in an edge case that I have not considered.
* Preserve stock metadata for refunded items.
Prevents fully restocked items on partially refunded orders from having stock reduced on subsequent order updates.
* Add E2E test covering errant restocking fix.
- Replaced `intval` calls with faster type casting.
- Showing more informative error messages.
- Using ternary for better legibility in `WC_Admin_Addons::output`.
- Added `is_wp_error` check to avoid warning from `count` call in `html-admin-page-addons.php`.
- Always showing error message as detail in error output.
- Showing error detail message above "To start growing your business, head over to WooCommerce.com" text, instead of below.
* Wrap notes with Card component -- Added header, badge, and cllipsis menu
* Add hover state
* Dismiss note immediately without prompting a confirmation (https://github.com/woocommerce/woocommerce-admin/pull/7868)
* use woocommerce-admin-dismiss-notification class to target the dissmiss btn
* Add changelog
* Specify CSS styles so tha they dont get overridden by other plugins
* Update changelog
* Add is_read column
* Do not update activity_panel_inbox_last_read upon viewing the homepage
* Remove use of last_read variable
* Return is_read field from the note api
* Use is_read field and remove last_read from the test
* Set is_read to true when an action is triggered
* CSS changes for the read state
* Apply padding and border if there are multiple actions
* Remove unread indicator
* Add changelog
* Update changelog
* Revert package-lock.json
* Fix onDismiss not being called after rebasing
* Check is_read before setting it to the obj -- this prevents uninteded error messages piling up in case is_read col is missing for some reason
* Revert changs added by mistake during rebasing
* Revert changes to package-lock.json
* Remove incorrect changelog
* Commit to triger Github workflows
Improve (by a lot) the performance of the queries for the
product attributes lookup table by doing the following:
1. Fallback the query for the "AND" case to thequery for the "OR" case
when there's only one term being filtered for the category
(the subquery for the "OR" case is much simpler)
2. Collapse all of the "AND" queries (for all the categories)
into a simple one (this is possible since term ids are unique
even across categories)
3. The most important change: introduce an extra derived query,
so
...AND posts.ID in ( SELECT product_id FROM lookup_table WHERE...
becomes
...AND posts.ID in ( SELECT product_id FROM (
SELECT product_id FROM lookup_table WHERE...
This causes the filtering subquery to be executed only once.
This was needed to activate the feature for filtering products
by attribute using the new lookup table. The lookup table still
needs to be created and filled via the tools page.
* Wrap notes with Card component -- Added header, badge, and cllipsis menu
* CSS changes to adjust padding and margin
* Update text and classname
* Add dismiss all modal
* Render dismiss all modal
* Dismiss all notes
* Update client/inbox-panel/index.scss
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Update client/inbox-panel/index.scss
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Move text to inline
* Pass onClose callback instead
* Move dismissAllNotes into the modal component
* Rename dismissNote to onDismiss
* Alias setShowDismissAllModal as onDismissAll
* Reset margin-bottom to prevent the latest GB to add unwanted margin-bottom
* Commit to triger Github workflows
* Add changelog
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
Previously we were increasing coupon usage count on every apply_coupon method. This was causing double usages because, we would also increase on order save callback.
We instead now call `wc_update_coupon_usage_counts` in apply_method itself, which would increase the usage and also set the `_recorded_coupon_usage_counts` order meta.
Additional, we also manually call $couon->increase_usage_count if `_recorded_coupon_usage_counts` is because in this case, we are likely applying more than one coupon to the order. And `_recorded_coupon_usage_counts` meta would have already been set by the first coupon. This is not a good solution, ideally we should revamp how we store the coupon recorded information to support multiple coupon information from the get-go.
* Create more sample orders data.
* Code formatting.
* Add tests for pagination.
* Formatting.
* Add test case for inclusion and exclusion parameters.
* Add test for parent and parent_exclude parameters.
* Add test case for status parameter.
* Add test case for customer parameter.
* Add test case for product parameter.
* Create a test order with all numerical properties populated.
* Add test case for precision parameter.
* Add test case for search parameter.
* Add test case for orderby parameter.
* Move missed api-core-tests files.
* Force tests to run in band (sequentially).
* Allow empty arrays to be cached
* Fix second check
* Add tests for attribute function changes
* Use InvokedRecorder to explicitly assert invocation count.
Provides more friendly failure messages and self documenting code.
* Code format fixes
* Add class check to added tasks
* Make Task class asbtract
* Update tasks to use abstraction
* Update task property calls to methods and add extended class
* Fix up task tests
* Reorder script enqueing to check less expensive operations first
* Fix up dismissable and snoozeable checks
* Fix up typos
* Load default task classes on init
* Handle PR feedback
* Fix extended tasks not showing
* Update is_visible to can_view in deprecated tasks
* Use TestTask class for unit tests
* Add changelog entry
* Fix up API tests
* Update ExtendedClass name to DeprecatedExtendedClass
* Fix up rebase
* Initial refactor
* Update payment recommendations to use new endpoint data
* Make sure to run specs
* Fix test
* Delete old PaymentPlugins class
* Update url to point to woocommerce.com
* Remove unused displayable prop
* Move option name
* Fix js tests
* Add changelog
* Reverting changes in https://github.com/woocommerce/woocommerce/pull/30380, preparatory to merging the My Subscriptions and Marketplace pages back into one Extensions page.
* Moved category nav to a separate file.
* Added main nav tabs.
* Added category nav, styled the mobile version.
* Experiments with doing category tabs as a list.
* Styling category menu as a list of links in rectangular pills on desktop.
* Adjusting margins of product list in in-app marketplace.
* Removed `submenu_file` filter which called deleted `update_menu_highlight` method.
* Restored styling for update count bubble on My Subscriptions tab.
* Styling update bubble on My Subscriptions tab.
* Addressing design feedback. Restyled category pills to make them more obvious. Added `Browse categories` title before category menu on desktop. Changed `.addon-product-group-title` to an h2.
* Addressing feedback from https://github.com/woocommerce/woocommerce/pull/31085#pullrequestreview-806319880.
- Removing addition of `admin_title` filter calling deleted `update_my_subscriptions_title` method.
- Prepending `__DIR__` constant before path in `require` call.
* If the navigation feature does not exist, have the NavigationNudge note self-action.
* Create delete_if_not_supported method on NavigationNudge note.
If we encounter this situation again we might consider adding a version of this method to NoteTraits.
* Add possibly_delete_notes() to do_wc_admin_daily().
* Add changelog entry for Issue 7807.
* Add should_note_exist() method to NavigationNudge note.
* Add should_note_exist() and delete_if_not_supported() to NavigationFeedback.
* Add NavigationFeedback::delete_if_not_supported() to possibly_delete_notes() in daily cron.
* Fix changelog missing PR number.
* Update changelog to include navigation feedback note.
* Rename should_note_exist and delete_if_not_supported to is_applicable and delete_if_not_applicable, add to NoteTraits.
* Removed Changlogger Autoload
* Changed Jetpack Changelogger Formatter Loading
Rather than using the Composer autoload, we should use the
changelogger's "filename" option to point directly at the file.
This keeps the file out of the autoloads, since it's possible that
plugins or packages may be symlinked and break the relative
path to the plugin.
* Add endpoint to unhide task list
* Rename show method to unhide
* Replace requests for hidden task list options
* Replace unhide task list requests
* Replace task list complete checks
* Replace dismiss option requests
* Remove complete task option check
* Fix up panel buttons
* Update finished setup to wait for task list resolution
* Create selector for getting a single task list
* Add selector for single task
* Fix task list panel visibility
* Add changelog entry
* Fix empty product types in profiler data
* Revert to checking for hidden task list
Autocomplete is default to on in most browsers, this is usually fine, but FireFox will overwrite actual value with whatever user entered last. This means if we change the quanity in some other page, and then refresh the cart page, the last entered value in cart page will be displayed, overwriting the actual value passed by server.
So autcomplete is disabled by default for quanity input field, further a filter is added like other fields in case this needs to be modified.
The symbol for the Swaziland (now Eswatini) Lilangeni is not L (for Lilangeni),
but E (for Emalangeni, plural). Even if it is just one Lilangeni, it is written as
E1.00.
* Add promoted card to in-App marketplace page
* Change name of transient
Changed name of transient for v2.0 of in-app marketplace featured page
content, so sites upgrading to WooCommerce 5.9 will get the correct
data for the new version of the page.
* Add extra status properties to tasks
* Convert extra properties to camelcase
* Replace task status usage in client
* Remove task status data store
* Remove task status endpoint
* Remove remaining task status references
* Add has products to appearance task data
* Handle PR feedback
* Fix up additional data for Avalara task
* Add changelog entry
* Move woocommerce tax flow to subdirectory
* Add partner cards
* Use png for logo files
* Add partner card other actions
* Add partner card styling
* Add in mobile styles
* Interpolate links and html elements
* Redirect to tax configuration if Avalara not supported
* Mark task complete if Alavara is installed
* Record events when task partners are shown or selected
* Add changelog entry
* Update task card flow based on visible partners
* Skip plugin step if all plugins installed
* Move reusable components into subdirectory
* Record available partner options
* Fix type reference
* Wrap callback functions in useCallback to avoid rerenders
* Handle PR feedback
* Add key to partner card container
* Add testing instructions
Modify wc_get_price_excluding_tax so that when there's no user
available from a passed order and the
'woocommerce_adjust_non_base_location_prices' filter returns false,
the shop base location is used for the tax calculation instead of
the location of the currently logged in user.
PR #30692 modified 'wc_get_price_excluding_tax' so that if an order
is passed its customer will be passed to WC_Tax::get_rates in order
to use the proper location for the taxes to be discounted. The problem
is that when the order has no customer (it's "Guest") an invalid
customer (id=0) is passed, which has no location, and thus no taxes
are deducted whatsoever.
The fix consists of checking if the customer id from the order is 0,
and in that case no customer is passed to WC_Tax::get_rates, thus
the shop location is used for the taxes.
* - Increased `per_page` parameter of API request in `getRecommendedPlugins` from 6 to 9, to accommodate additional MailPoet item.
- Added new `mailpoet.js` with SVG icon for MailPoet, and corresponding entry to list of product icons.
* Changelog for this change.
* Renamed changelog.
* Added PR number to changelog content.
* Fix formatting
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Wrap notes with Card component -- Added header, badge, and cllipsis menu
* CSS changes to adjust padding and margin
* Change buttons to link style
* Render image only when the layout is thumbnail
* Add hover state
* Update text and classname
* Dismiss note immediately without prompting a confirmation (https://github.com/woocommerce/woocommerce-admin/pull/7868)
* use woocommerce-admin-dismiss-notification class to target the dissmiss btn
* Add changelog
* Specify CSS styles so tha they dont get overridden by other plugins
* Update changelog
* Remove message gap
* Remove unwanted changes from package-lock.json
* Update changelog
Moving this to `admin_init` also ensures that WC_Notes_Run_Db_Update has been instantiated before it can hook into the `woocommerce_hide_update_notice` action. See:
- WC_Install:init()
- WC_Notes_Run_Db_Update::construct()
closes#30781
* Update WCPay in person text
* Remove div wrapping finish setup button
* Add changelog entry
* Add US specific WooCommerce Payment suggestion
* Allow different gateway suggestion IDs for wcpay
* Add older fallback version of WCPay
* Change check to dev version of 2.9.0
* Use 5.10.0-dev for WC checks
* Add wc-admin-update-store-details note
* Add wc-admin-complete-store-details note
* Add notes to daily cron
* Add conditional display of notes if in experiment
* Fix bug preventing control experience being cached in transient
* Add filtering of experiment notes in REST API
* Revert "Add conditional display of notes if in experiment"
This reverts commit 99908b83d7868ae69dd1ccca1b565ee2de4dff0d.
* Add changelog
* Update changelog
* Refactor experiment condition for performance
* Add back in extension list title
* Separate task list and obw plugin lists
* Remove mailpoet from basics list
* Bump extensions REST API to v3
* Add changelog entry
* Add illustration images
* Refactor the way clicking task is handled, tracking clicks should be during CTA
* Refactor task list on select and rendering
* Add WCPay task and update existing tasks to use new API
* Change payments task behaviour to show after wcpay is connected
* Add couple more tasks
* Add marketing and appearance tasks, customize styles
* Refactor to use svg components instead of images, add custom task titles for experiment
* Updated tracking to be like existing task list
* Change default task shown to be the last
* Cleanup css
* Changelog
* Fix ellipsis menu css to be more specific to the respective tasklist