Add inline file delivery to WC_Download_Handler
Create a new setting option for inline file delivery for downloadable
products. In the Download Handler create a new method for the new
setting as well as a method for returning the proper headers to deliver
files inline.
Resolves: #28410
* Update Content Type of inline delivered files
* Update Downloaded file name
* Change content-disposition to be a checkbox
Since inline-delivery works with multiple download methods
* Document function
* Add new setting for test, see #31145.
* Better setting wording and remove typo comment.
* Address pr feedback.
* Add changelog.
* Rephrase the settings to make it more clear.
* More rephrasing.
Co-authored-by: Matthew Caldwell <caldwellysr@gmail.com>
Order-again item meta should store term slug instead of term value.
* Cleanup f26e62502c
* Remove extra tab
* Changelog.
Co-authored-by: Alexandre Froger <alex@froger.me>
Implement `get_order_id_by_order_key()` and related methods in the COT datastore.
* Implement `get_order_count()` in the COT datastore
* Implement `get_unpaid_orders()` in the COT datastore
* Implement `get_orders()` in the COT datastore
* Add unit tests for misc. COT datastore methods
* Add changelog
* Apply suggestions from code review
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Rename var
* Update docblock
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Add suppport for types and refund in migrations.
* Add changelog.
* Make CI happy.
* Add support for refunds save and read.
* Remove placeholder from order types eligible for migration.
* 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.
* Add types in unit test since we added it in schema.
* Remove unsetting type, its supported now.
* Add support for backfilling order types with different datastores.
* Use correct datastore while migrating.
* Support -1 for limit queries
* Order factory to support reading multiple order types.
* Add read_multiple to refunds data store.
* Return negative total for consistency with posts table implementation.
In custom tables, we can directly sum the value for total_amount since they are being stored in flat tables, instead of relying on _refund_amount meta.
* Remove type definations for back compat.
* Add test for get_orders
* Use persist_udpates method for consistency and DRY.
* Resolve conflict correctly.
* Removed duplicated methods.
* Use correct order in doc comment.
* Fix typo
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
* Rename parameter for better clarity.
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
* Rudimentary functional version of datetimepicker
* Adding changelog
* Adding package changelog
* Making component more than barely functional
* Removing unnecessary export
* Rename directory to date-time-picker
* Add initial story
* Pass datetime to onChange callback
* Localize error string
* Remove initial error prop
* Rename currentDate to initialDate
* Simplify state for selected date
* Add extra stories around component
* Trigger onChange whenever date is changed
* Add readme
* Allow currentDate to be changed via props
* Update readme
* Update name to DateTimePickerControl
Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
* Support searches as a direct feature of (COT) order queries.
* Always add `DISTINCT` to order queries.
* Add test (+fix order search logic for matching order IDs).
* Changelog.
* Clean-up search_orders() method, remove original roughed-out search code borrowed from CPT data-store.
* Tidy.
Handle invalid `meta_query` similarly to `WP_Query`
`meta_query` needs to be an array of arrays. Elements in `meta_query` that do not conform to the expected format will be ignored.
* Expose the SQL query in OrdersTableQuery for debugging purposes (similar to WP_Query)
* Add changelog
* Drop unnecessary `is_array()` check
* 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.
* 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
* 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.
* 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>
* 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>
* 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
* 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>
* 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
* 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
* 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
* 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.
* 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
* 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
* 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
* 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.
* 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
* Use WC_Order_Query for REST API v3 requests when COT is enabled
* Remove pre-COT internal meta keys from metadata in REST order responses
* Add changelog
* Add unit tests
* Fix test in `ProductAttributesLookup\FiltererTest`
Some tests in this class relied on a particular ordering of an array of IDs returned by a query with an `ORDER BY` that doesn’t really disambiguate sorting (all rows have the same values for the fields). As such, `assertEquals()` can’t be used to make sure arrays had the same values.
* Use `get_internal_meta_keys()` from a CPT instance to hide certain meta on COT REST response
* Move COT REST test outside of the COT datastore tests
* Fix typo
* Remove unnecessary imports
* Make ProfileItems properties optional
* Remove skip button codes and replace them with SkipButton component
* Add SkipButton component
* Add changelog
* Add back continue button callback
* Apply popover styles globally
* Add skip button on the industry step
* Add skip button on the product types step
* Add skip button on the Business Details step
* Support onSkipped callback
* Record skip event
* Add skip event track for industry, product types, and business details
* Add SkipButton to the theme step
* Update snapshot
* Change track name to separate business details and free features
* Add changelog
* Remove unused code
* Update product types test snapshot
* Add back UsageModal on Continue click
* Update e2e tests to use Skip
* Use button selector for skip btn
* Fix duplicate event dispatch
* Do not call onClose and onContinue during the rendering -- it causes cannot update a component while rendering a different warning. Instead, call them when the button is clicked
* Skip the profiler without rendering usage modal when woocommerce_allow_tracking is set
* Skip the profiler without rendering usage modal when woocommerce_allow_tracking is set
* Go to the next step when allowTracking is yes
Add screen reader labels to improve accessibility in various locations.
* Adding missing table header labels
* Adding missing form field labels
* Adding missing form field label
* Adding missing form field labels — Ideally we would add these with `<labe>` tag (may be hidden with `screen-reader-text` class), but playing safe here to prevent CSS style issues.
* Adding missing form field label
* Changing `aria-label` attribute to actual `<label>` tag
* Rebase; add changelog.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
Add method in utils to check whether posts and order tables are in sync.
* Add changelog.
* Fix Yoda condition
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
* Add e2e test to check ability to add and remove regions from shipping zone
* Add changelog file
* skip test in order to check CI
* add skipped test back in
* group shipping zone tests to avoid concurrency issues
* update assertions relevant to added zone region
* update test file
* update test to select appropriate delete based on other tests
* Ensure the correct Shipping Zone has been removed
* remove attempt to delte zone via front end as API call will handle this
* Update store details task complete logic
Mark as completed if the store address, city and postcode are set.
* Add changelog
* Update store details test
* Stop resetting all definations in DI to not initialize hooks again.
* Adjust setting test to account for COT feature.
* Support temporary tables.
* Add changelog
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
- Use the built-in phpcs sniff for "includes" (as warnings)
- Use the slevomat coding standards package for the rest of the code
(as errors, with the ability to auto-correct)
* Change package json commands and turbo repo config to allow for greatly simplifying running turbo
* Remove require-turbo script which was causing caching issues
* Colorize CI output from scripts
* Add missing changelog script to extend-cart-checkout-block
* Add product page layout components
* Add a quick sample page to test the product form layout
* Add changelog
* Add option 2
* Refactor the product field layout structure
* Update page component structure of product form
* Add simple SlotFill support
* Update product page chunk name
* Add order to slot fill and move product field layout wrapper into product category layout
* Remove unused import
* Consolidate the slot fill ordering logic
* Rename category component to section component to prevent confusion
* Remove edit product page and use the new add product page instead
* Add tests
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Update store details unit tests
* Update store details subheading and field order
* Update obw store details e2e tests
* Add changelog
* Add changelog
* Update Store owner can go through setup Task List test
* Add feature falg
* Modify href to menu item
* Modify page title href button
* Add product files on Client
* Change button's URL for new Nav
* Add changelog
* Moved changelog
* Fix URL for new nav
* Change URL for add product task
* Add Tracks event
* Change const name
* Renamed tracks event name
* Undo Add New Product redirect
* Undo use Products addition
* Undo lint fix to woocommerce_admin.js
* Rename component and file (AddProductPage)
* Set flag in core.json to false
* Fix typo
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Update miscellanous WC bits to support custom tables.
* Add changelog.
* Add test for order_meta call.
* Make CI happy.
* Add tests for before_delete_order.
* Add test for is_valid_resource
* Add tests for PayPal API.
* Add test for save paypal meta data.
* Minor fixup.
Remove the explicit dependency from the psr/container package
* Prepend the psr/container package classes with a namespace using Mozart. This is done to prevent conflicts with other versions of the package used by other packages or plugins.
* Add changelog file
* Minor documentation/indentation updates
* Column sorting for the COT admin list table.
* Add filter for easier extensibility.
* Changelog.
* Add support for orderby order’s total and creation/modification dates
* Remove unnecessary import
* Use ‘any’ instead of ‘all’ as status so that all valid statuses are used instead
* Use ‘order_total’ as orderby GET arg for backwards compat
* Rework sorting logic after support in `OrdersTableQuery`
* Update `@since` tag
* Make PHPCS happy
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
* Remove setup_experiment_1 and setup_experiment_2 tests and css
* Remove setup_experiment_1 and 2 from the client code
* Copy over setup_experiment_1 options to the setup tasklist and remove setup_experiment_1 and 2
* Add changelog
* Determine the default component to use by task id
* Update plugins/woocommerce-admin/client/tasks/hooks/useActiveSetupList.ts
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Introduce the ObjectCache class.
It's an abstract class intended to be used to implement caching for
any kind of object (arrays or PHP objects) using the underlying
WordPress caching or any alternative custom cache engine.
* Add changelog file
* Change the order of parameters in ObjectCache::get
Also change the max expiration value from one day to one month
* Implement order edit screen rendering.
* Add changelog.
* Use global function instead of harcoded string.
* Use pagecontroller to display order edit form.
* Move HTML out from the translatable string.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Capitalize `Order` for consistency.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Minor realignment.
* phpcs fix .
* Decouple meta boxes from global $post object to support custom order tables.
* Bug fixes - improperly set $order object, and allow passing null.
* Make order item meta work with order object.
* Use `$order` object to minimize diff.
* Refactor $theorder object initialization to a common method.
* Remove check for WC_Order object.
* Move common methods to inside `src` in a dedicated class.
* Fix spacing for code style.
* Renamed method to be more accurate.
* Add proxies for static so they can be mocked.
* Remove PageController import.
* Move helper methods to an internal util class.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Support force_default_suggestions argument
* Use force_default_suggestions
* Support force_default_suggestions argument -- returns the default payment suggestions when both woocommerce_show_marketplace_suggestions and woocommerce_setting_payments_recommendations_hidden options are set to no
* Add changelog
* Add methods to get and clear queued pixel events
* Add utils for getting and asserting events in unit tests
* Add in some assertions around task list completion tracks
* Add changelog entry
* Add comment for test task fixture
* Stop re-enabling product attributes lookup table usage after each install.
Now the option will be enabled after a WooCommerce install/update
only if the user hadn't explicitly disabled it before.
* Add changelog file
* Make sure orders are saved with a default status
* Add support for ‘customer’ query var in COT
* Make PHPCS happy in COT datastore tests
* Add tests for ‘customer’ query var
* Add changelog
* Add OrdersTableQuery for querying the COT tables
* First stab at `OrdersTableDataStore::query()` method
* Silence possible PHP warning
* Add docblocks & phpcs fixes
* Introduce OrdersTableMetaQuery
* Add support for meta_query
* Add changelog
* ‘status’ should have the ‘wc-‘ prefix
* PHPCS fixes
* Minor improvements
* Add tests for OrdersTableQuery
* Remove ‘paginate’ query var
* Add support for reading multiple objects at once
* Address feedback
* Prevent `get_order_data_for_ids()` from producing an incorrect query when no IDs are passed
* Make CI happy
* Add WooCommerce default styles for block themes
* Ensure sale badge remains as is in Twenty Twenty-Two
* Style the mark element in theme colors
* Update product variations dropdowns
* address feedback
* address feedback
* fix store notice position
Co-authored-by: Luigi <gigitux@gmail.com>
The attributes page displays all the terms for all the existing
product attributes, which causes a performance problem in sites
with a lot of attributes and terms.
This commit limits the number of attributes shown to 100 by default,
but it also introduces a woocommerce_max_terms_displayed_in_attributes_page
filter to customize it.
* Use method_exists instead of throwing in reflect_class_or_callable
In AbstractServiceProvider::reflect_class_or_callable we were
detecting whether a 'init' method exists in the class or not via
doing 'new ReflectionMethod' and catching the exception.
This caused problems with XDebug, which is bad enough, but additionally,
throwing an exception when it's not abosultely necessary
is a bad practice in general.
* Add changelog file
* Fix code standards errors in class-wc-meta-box-orrder-data.php
- Sanitize all input
- Escape all output
- Verify nonce on save
- Verify that all required POST parameters are present on save
- Minor fixes (periods at end of comments, function docs, Yodas...)
* Check payment method name, not title, on add_order_item_totals_payment_method_row
* Remove unnecessary nonce verification in "save" for orders.
Also move comment to new line for readability.
* Remove unnecessary nonce check in WC_Meta_Box_Order_Data::save
The check is already performed in the code that invokes "save".
* Add transaction id to payment method string if URL doesn't exist
* Minor fix
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
* Update woocommerce admin scripts to align more with monorepo
* Add changelog
* Add dev script back in
* Add install-if-deps-outdated back into build script
* Remove --force from dev script and add WC_ADMIN_PHASE to turbo cache key
* Remove install-if-deps-outdated from build
* Add composer install step to pr unit tests workflow
* Remove old install scripts, that are not needed anymore
* Make sure client changes are part of the cache hit
* Add composer install to code coverage and code sniff as well
* Add composer_no_dev input to install-build workflow
* Add sass dependency to woocommerce/admin/client turbo cache
* Add validations to `recordEvent`
* Add changelog
* Use always class constant
* Changed trow exception by console.error
* Add tests to `validate_and_sanitize`
* Created 2 different methods to test `event_validation_and_sanitization`
* Fix tests
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Fix free features is still rendered when there is no recommendation
* Add changelog
* Update BusinessDetails tab to go to next step if no installable extensions
* Update spinner
* Set retries to 4 on CI
* Use variable for authentication path storage
* Handle test cleanup in after hook
* Improve conditional
* Clean up global attributes
* Update customer email address
* Changelog file
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Updated wp-env test port
* Added script to init test env
* Added env helper scripts
* Updated admin email to match wp-env
* Fixed flaky tests
* Updated test readme
* Updated workflow to use wp-env
* Added changelog
* Stored admin email in variable
* Added check for flaky test
* Updated workflow to work with both envs
* Updated README.md
* Updated condition
* Updated changelog
* Fixed workflow
* Fixed workflow
* Fixed workflow
* Restored workflow
* Updated check to be a string
* API: System Status: Cache plugins data
This is a follow up to https://github.com/woocommerce/woocommerce/pull/32823
where we introduced caching for retrieving theme data. Here we're
cachcing plugin data. Since we have to read from the filesystem and
parse the plugin headers, this can be kind of slow.
We should see an improvement on sites with more than a few plugins and
the improvement could be significant on sites that have many plugins
installed (even if they're not active).
* add CLI com command class and hook it
* Update php docs and change registered command names for wc com.
* Fix lint issues.
* Retrieve and display extension list and for the connected site.
* Adding the changelog for wc com extension list
* Remove the install command which not implemented in current branch.
* Update example usages for wp wc com extension list command.
* Update changelog.
* Fix the changelog file formatting
Co-authored-by: Rommel Castro <rommelxcastro@gmail.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
* Update github action to equire valid changelog file
* Update github action for changelogger to install depedencies and composer
* Make valid changelog files that were invalid
* `add_meta()` should be more flexible
* Add `delete_order_data_from_custom_order_tables()`
* Add private method `trash_order()` to COT datastore for handling order trashing
* First stab at COT datastore `delete()`
* Delete COT data for orders when deleting its associated post
* Add changelog
* Simplify delete logic
* Minor fixes
* Rework `create()` tests
* Add tests for `delete()`
* Remove unnecessary var
* Set allowedTextDomain to only allow woocommmerce text domain
* Set allowedTextDomain to only allow woocommerce text domain
* Fix wrong or missing i18n text domain
* Add changelog
* Add changelog
* Updates to simple product test to reduce flakiness
* Remove focus
* Fix to improve flakiness of order refund test
* Added a wait to help page loads test
* Add a couple more waits to refund tests
* Changelog
* Retry key generation during global setup
* Setup checklist has changed, update
* Update to setup task list
* Add wait for setup checklist
* Update locator for install checklist
* Changelogger: Fix PHPCS violations (#33664)
* Deploy header task variant from task list experiment (#33750)
* Deploy task list experiment 1
* Add changelog
* Fix wrong copy in the payment task (#33749)
* Add headingDescription prop to PaymentGatewaySuggestions list
* Fix payment suggestions heading text
* Add changelog
* Fix missing manage button for TikTok (#33731)
* Fix missing manage button for TikTok
* Add changelog
* Packages: Fix postinstall errors on install (#33724)
* Fix additional payment task name (#33727)
* Rename "Set up additional payment providers" task -> "Set up additional payment options"
* Add changelog
* Remove change files for #33704 (#33734)
* Add shipping class data store (#33765)
* Add initial shipping classes data store
* Add types for the product shipping class store
* Filter out undefined items in list for when an item is deleted
* Add changelog
* Add data store README
* Fix onboarding test
* Skipping flaky test
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
Co-authored-by: louwie17 <lourensschep@gmail.com>
* Final updates for Playwright
* Update config
* Add uuid dependency
* Increase retries to 2
* Update selectors on shipping page
* Use baseURL instead of hard-coded URL for API
* Clarify comment
* Use baseURL instead of hard-coded URL
* Check to see if an order was created before attempting to delete it
* Add changelog
* Turn on Playwright tests in GitHub
* Increase timeout for CI execution
* Update configuration options (minor edit)
* Fix for checkout flaky test
* Parse orderId from URL
* Check for substring
* Streamline email tests
* Remove .only
* Only clear email logs of messages for test
* Get orderId from page element
* Fix for test not waiting for reset
* Add in second wait for Performance section
* Change significance from minor to patch
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Make sure the default form value tooltip is initialiazed when adding the first variation
* Update copy of default form value tooltip in variations
* Add changelog
* Fix auto formatting
* Add pointer events: none to tooltip to prevent flickering
* Change review shipping task id to 'review-shipping'
* Add click track for shipping-recommendation task from the settings page
* Changelog
* Add test
* Add more specific test param
* Add pyament icons
* Add changelog
* Text and logo changes when wc pay is installed and setup
* Use PaymentSuggestions to query plugins
* Make sure image_72x72 exists
* Remove unused namespaces
* Remove stripe2 image -- no longer needed
* Make sure recommended payment is not already active
* Check plugins field to filter out active plugins
add: intro tooltips for shipping smart defaults
- removed php code for setting 'reviewed' option as it was being set on page load and thus always evaluated to true before the user sees it
- added intro tooltips
Update wp-background-process.php to use wp_convert_hr_to_bytes()
Currently the code is typecasting the memory limit to an int. This assumes that the memory limit is in MB, so if you set your memory limit to 4G this will return 4194304 bytes (4.19304 MB.) Instead, we should use the native WordPress function `wp_convert_hr_to_bytes` to handle the conversion into bytes correctly.
* Update StoreDetails task action url to navigate to the setting page
* Add changelog
* Update complete logic of StoreDetails task
* Update store details unit tests for new task completion logic
Added `triggerHandler` before each ajax request.
* Added namespace to event name
* Linting.
Co-authored-by: Luigi Pulcini <luigi@barn2.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
This reverts commit bccc80366d.
When we merged this PR, we thought the Woo mobile apps would have enough time to implement some corresponding changes on their side. That turned out not to be the case. Without the ability to force a refresh of the analytics cache, this PR causes the apps to have a greater risk of showing users stale analytics data that they can’t immediately update.
* Include Tracks property indicating block editor on product update.
* Add changelog
* In a block editor the Update button does not have the selector.
* Remove - from Tracks even property.
* Refine a condition of a non-empty object.
* Incorporate feedback: add callback for rendering the Update button.
* Add recent feedback- jQuery way of handling post render execution.
* Remove `console.log
* Fix `product_update` event recording
* Removed `hasRecordedEvent` and fixed `description validation
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Update shipping task fields when shipping smart default feature is enabled.
* Always display the shipping task regardless of having a physical product
* Updated text copy for the fields
* Do not display the step description if it is not the current step
* Added a banner for the shipping printing step
Remove description if the it is not the current step
* Add changelog
* Fix namespace conflict after the rebase
* Re-use wcs banner from the experimental shipping recommendation
* Delete ShippingLabelPrinting -- replaced by wcs banner from experimental-shipping-recommendation
* Add TOS link
* Remove ShippingPrintLabel styles -- no longer needed
* Minor refactor
* Move description set logic to getSteps()
* Use map to override step fields
* Remove unnecessary feature check
* Remove description in the map func
* Render ShipStation banner if plugins includes woocommerce-shipstation-integration
* Plugins component skip button is now optional
* Add link from payment settings page
* Add new experimental shipping task flow
* Changelog
* Update plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/ExperimentalShippingRecommendation.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Rename all tracks to shipping_recommendation
* Add back skip installer bind
* Pass plugins list to pluginSlugs to be more predictable
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Add logic to set the default shipping options
* Set the flat rate cost to 15 (temp cost)
* Add changelog
* Update plugins/woocommerce/src/Internal/Admin/Homescreen.php
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Run the changes only if shipping-smart-defaults is enabled
* Assume user is going to sell physical products if obw is skipped or the store details has not been completed
* Make sure store country is set by an actual user by checking the value of woocommerce_store_addres
* Remove flat late logic
* Use woocommerce_store_address. store_address is always empty
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Add phpcs-changed
* Put report flag value in quotes
* Use phpcs action workflow instead
* Remove no longer used phpcs script
* Remove phpcs ignore rule
* Use proper name for code sniffer step
* Fixes issue #33335
Check for an empty string instead of an empty variable.
* Update wc-product-functions.php
* Update wc-product-functions.php
* Changelog
* Fix cases when $term is false or empty array
Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>