* We display the number of selected items, e.g., '5 selected'
* We display a number of all existing items next to the button, e.g., "Select all (25)".
* When only some items are selected on the page, we show an additional button that says "Select page (X)" where X stands for the number of rows on the page. Clicking it selects all rows on the page.
* Clicking "Select all" selects all existing items
* Add changelog file
* Add tracking events
* Saving progress on variations table
* Manage tracking events and error handling
* Hide edition features when at least one variation is selected
* Fix linter errors
* Resolve rebase conflicts
* Remove use selection hook since is not needed anymore
* Fix filter items vertical alignment
* Add changelog files
* Fix inconsistent loading and variations state
* Do not show EmptyTableState when the product has variations but the filter get empty list
* Invalidate cache state before generating variations
* Fix select all after filtering variations
* Remove delete variations from the selection list
* Retreive the product after generating variations
* Fix linter
* Invalidate variations cache after generating variations
* Separate count query
* Fix total_results var
* Add count-low-in-stock endpoint
* Use new count-low-in-stock endpoint
* Fix inconsistent in function names
* Type cast to int
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix spelling
* Separate count query function
* Add changefile(s) from automation for the following project(s): woocommerce
* Use get_count_query
* Use count-low-in-stock endpoint
* Remove condition where it only updates product count when there is less than 2 items -- no longer needed as we are using a new endpoint to count the products
* Fix spelling
* Add changefile(s) from automation for the following project(s): woocommerce
* Lint fixes
---------
Co-authored-by: github-actions <github-actions@github.com>
* Bump version in composer.json
* Update lock files
* changelog
* ensure the properties exist before accessing them
* add changelog file
* skip a test that is waiting for a fix from WooCommerce Blocks
* appease the linter
* remove commented out code
* use `empty` instead of `property_exists`
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Update WooCommerce Blocks package to 11.5.1
* Update WooCommerce Blocks package to 11.5.2
* Undo test removal
* bump to woocommerce blocks 11.5.3
---------
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Leif Singer <git@singer.sh>
Co-authored-by: Leif Singer <leif@automattic.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Clean up created pages and posts
* Move tax tests so that they run last
* Improve locators
* Changelog
* Improve locators
* Improve locator on heading
* Change assertions to look for alert text
* Change assertion to look for text
* Update locators
* Update locator
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Marketplace: table design updates
* Marketplace: address PR feedback
- Added enum for status levels
- Fixed color for the table rows
- Used ADMIN_URL for referencing plugins page
-
* Marketplace: Update WooCommerce.com references to Woo.com
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Marketplace: fix how status badges look on narrower screens
---------
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Add 2 additional steps between the loader steps
* Support onChange callback
* Add loader progress transition
* Add smooth transition story
* Set the initial percentage to 5 to make the transition smoother
* Add changefile(s) from automation for the following project(s): @woocommerce/onboarding, woocommerce
* Add smooth-transition class to the progressbar
* Fix lint
* Update AssembleHubLoader
* Fix e2e
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Rename Centered Header Menu with Search pattern
Since the search bar has been removed from this pattern, this PR renames
the pattern title and slug to reflect that change.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Avoid a type error when performing an `array_sum()` under PHP 8.3.
* avoid short array syntax (linter)
---------
Co-authored-by: Leif Singer <git@singer.sh>
* Copy WelcomeGuide from gutenberg
* Remove CSS copied from guide component since it's not influencing the product Welcome Guide and it's interfering with the block editor welcome guide
* Fix issue with box-sizing
* Fix lint issues
* Show guide only when modal is open
* Add changelog
* Remove template and fix issue with component not re-rendering
* Add comment
* Add additional changelog
* Rename component
* Add the wc_allow_changing_orders_storage_while_sync_is_pending filter
For HPOS the idea is to disallow changing the authoritative data
source for orders (new tables <--> posts table) while there are orders
pending synchronization, since this can lead to data loss. However,
while this was indeed disallowed in the features UI, it was still
possible to manually change the value of the corresponding option
(via "wp option" command); there was code in place to prevent this
(by throwing an exception) but it had been commented out to ease
testing during the development of the feature.
This commit restores that commented out code, so in principle,
trying to change value of the option while there are orders pending
synchronization will throw an exception. BUT a filter is introduced,
wc_allow_changing_orders_storage_while_sync_is_pending, to allow
bypassing this behavior: the filter returns "false" by default, but
if it returns "true", changing the option will never throw an
exception. This is needed for a few of the existing unit tests,
but otherwise it should never be done (and the filter is documented
as such).
Additionally, if the filter returns "true" it will be possible to
change the value of the option in the features UI; but a warning
message will be shown in red if there are orders pending sync.
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix code inadvertently duplicated when merging from trunk.
* Add changefile(s) from automation for the following project(s): woocommerce
* Fixes after manually undoing merge conflicts
* Fix linting issue
* Fix unit tests
* Fixed a bug that allowed changing the authoritative table from wp cli
even with orders pending synchronization
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix some more unit tests
* Delete duplicated changelog file
---------
Co-authored-by: github-actions <github-actions@github.com>
Allow removing postcode and state fields from the shipping calculator, if they're not needed for calculation, even if they're required at the checkout.
Fixes#28393
* Add tests for tax display for the shopper
* Add changelog
* Renamed .spec file
* Fixes for re-testability
* Fix a locator problem
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Apparently Link with type wp-admin is the same as normal anchor link anyway, there is no special code handling for wp-admin. So we might as well just use the normal link, and remove the dependency on Link.
* Increase a couple of timeouts
* Remove duplicate update to nightly
* Add changelog
* Install Playwright
* Handle Playwright setup
* Add in build name
* Add in check in e2e tests for daily run
* Reverse check
* Rookie mistake
* Use ternary operator instead
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Preload Jetpack data even without Jetpack plugin installed
Now that the Jetpack Connection package is a dependency
of WooCommerce, preload Jetpack data even when the Jetpack
plugin is not present.
Fixes#41070
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint issue
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Update readme.txt
Changed links from WooCommerce.com to Woo.com.
* Update reference to WooCommerce Marketplace.
* Swap `woocommerce.com` with `WooCommerce Marketplace`.
* Swap `WooCommerce.com`, replace with `Woo.com`.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
* add store_id to WC_Tracker and Tracks; add blog_id to WC_Tracker
* update wc-install-test; add wc-tracks-test
* improved blog_id accessor and more tests
* attempt to mock
* spacing
* revert jetpack options changes
* linting fixes
* linting fixes
* rm blog_id test
* remove blog_id tests
* Add changefile(s) from automation for the following project(s): woocommerce
* fixes after PR review
* Add changefile(s) from automation for the following project(s): woocommerce
* update version
* fix linting error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Hide theme and default palette
* Add changefile(s) from automation for the following project(s): woocommerce
* Lint fix
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Reduce the logo preview to a maximum width of 60px
* Add changelog
* Set max height and width to 250px
60px was too small!
---------
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Use the Hero Product Split pattern as the initial one for all templates.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Create product variations filter component
* Add slug to the product and variation attributes
This is needed to be able to filter variations by specific attribute slugs
* Add support to filter variations by many attribute options
* Integrate attribute options filter in variations table
* Fix rebase conflicts
* Set initial filter values
* Improve intial filter values and cache invalidation
* Add changelog files
* Fix linter errors
* Fix unit tests
* Change the min amount of options to show the search input
* Fix invalid cache key generation for the datastore
* Fix unit tests
* Fix linter errors
* Fix js tests
* Add terms pagination for varition filters
* Load terms on demand plus pagination
* Show selected option names as the dropdown button toggle text
* Fix invalida state when reset and on close the popover
* Revert adding selected options as part of the dropdown toggle text
---------
Co-authored-by: Fernando Marichal <ultimoround@gmail.com>
* Try getting a site preview in the banner working.
* Change to use iframe instead
* Changelog
* Fix lint issues
---------
Co-authored-by: Chris Runnells <chris.runnells@automattic.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Set default logo width when updating the template
* Set current logo width to the inserting patterns
* Add changelog
* Fix tests
* Apply logo width in use-patterns
* Disable header and footer on cys pages
* Support showNotices and showStoreAlerts to control Notices and StoreAlerts from the layout
* Disable Notices and StoreAlerts from CYS
* Support showPluginArea -- setting this value to false disables plugins
* Disable plugin area in cys
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* add a failing test for setting shipping total to empty string (fails on PHP 8.x)
* make the WC_Tests_Order_Item_Product::test_get_item_shipping_total test pass
* add changelog file
* add some more explicit conversions to float where we add values and can't be sure it's not a string
* appease the linter
* set array_reduce's initial value to 0.0
* Load standard includes and template functions in REST API and some admin contexts.
This is primarily needed to support the use of legacy shortcodes within the block editor, as pre-rendering means the shortcodes will be invoked (and therefore any frontend/template functions the shortcode handler might call need to be available).
* Check session is available before accessing its methods from within shortcodes.
* Changelog.
* Coding standards (no assignment inside a conditional).
* Whitespace.
* Support testing if the request is of type 'rest-api'.
This preserves the accuracy of the 'frontend' definition. Additionally, having tightened that up, we explicitly include REST API requests as a condition in which we should load frontend includes (needed, to support quirks in terms of how the block editor does things—such as creating FE previews of blocks).
* `rest-api` is not used, and this is a private method so it is essentially dead-code.
* Return type clean-up for `wc_print_notices()`.
* dequeue wpcom.editor on cys pages
* Add gutenberg_version to wcSettings.admin
* Use the new consent string for Gutenberg 16.9 and above
* Add changefile(s) from automation for the following project(s): woocommerce
* Revert "dequeue wpcom.editor on cys pages"
This reverts commit 85c039c7dc.
* Update changelog
* Add changefile(s) from automation for the following project(s): woocommerce
* Revert "Add changefile(s) from automation for the following project(s): woocommerce"
This reverts commit 4554626fde.
* Fix lint issues
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Marketplace: Populate the table rows with components
* Marketplace: add links to dropdown menu and fix fallback product icons
* Marketplace: fix popover width
* Add My subscriptions install (#40630)
* Marketplace: add plugin install from the subscriptions page
Co-authored-by: berislav grgičak <berislav.grgicak@gmail.com>
* Marketplace: Use the activation function to show install button
---------
Co-authored-by: raicem <unalancem@gmail.com>
* Add WP updates script to the extensions page
* Add update button
* Add update data to subscriptions
* Update plugins
* Prevent update if license unavailable
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove all data from API
* Linter fixes
* Linter fixes
* Remove merge string
* Update link style
* Add comment for updates.js
* Prevent updates if required data is missing
* Return removed slug code
* My subscriptions action modals (#40934)
* Add renew modal
* Update install to run until new data loaded
* Add activate modal
* Add connect modal
* Add renew button
* Renewal button
* Rename activate to connect
* Add subscribe button
* Add action buttons
* Remove unused const
* Add changefile(s) from automation for the following project(s): woocommerce
* Update plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Update import path
---------
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
---------
Co-authored-by: raicem <unalancem@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
Adds a new file browsing view for Logs and sets the stage for other UI improvements described in #40644. In this view, the list of log files can be sorted by several different parameters and also filtered by the log's "source" (which is essentially the prefix on the log's filename). It has the standard list table feature of being able to select multiple rows at once and perform a bulk action. In this case, the only bulk action is currently to delete files. Clicking on one of the files brings you to the single file view, which at this point is just the old log file view.
Fixes#40915
* Set default logo size to 60px and max to 200px
* Hide homepage template label
* Scroll to position when selecting a pattern
* Fix preview opacity issue
* Update sidebar scrollbar style
* Fix onboarding tour resize handle
* Add changelog
* Make Cart and Checkout Blocks the default experience on WooCommerce installation.
* Corrected text domain for translations
* Added changelog entry
* Add changefile(s) from automation for the following project(s): woocommerce
* Change significance to major on changelog
* Update tooltips for the Cart and Checkout pages
* Deprecated woocommerce_checkout_shortcode_tag and woocommerce_cart_shortcode_tag
* Convert Cart and Checkout pages to shortcodes during setup phase of E2E, API, and k6 perf tests. (#40960)
* Add utility function to set shortcode cart, checkout pages
* Stabilize login steps in global setup, teardown
* Add minor jsdoc
* Simplify function
* Remove unnecessary env var
* Stabilize 1 flaky test
* Add minor jsdoc
* Add util function to convert cart, checkout pages to shortcode in API tests
* Convert to cart, checkout shortcode in k6 perf tests
* Get auth state from PW config
* Rename function
* Separate setup function
* Revert create-simple-product e2e test file
* Add changefile(s) from automation for the following project(s): woocommerce
* Deleted duplicated changelog entry
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: rodelgc <rodel.calasagsag@automattic.com>
* Remove dependency on Jetpack from WCS&T's task list item
- Remove installing Jetpack-the-plugin from WooCommerce Shipping &
Tax WC Home task list and recommended extensions area.
- Update Jetpack auth link generation to use getJetpackAuthUrl().
- Remove references of Jetpack-the-plugin from WCS&T onboarding
as the extension will now use the Jetpack Connection package
for establishing a connection between WPCOM infrastructure
and a Woo site.
* Update WooCommerce Tax flow in WC Home task list
* Inline the agreementText variable
* Add missing pluginSlugs prop to <Plugins> instance for WC Tax
* Fix WC Tax extension name in API response
* Remove Jetpack from copy in Tax task header
* Fix MD034/no-bare-urls MD linting violation
* Fix experimental shipping recommendation tests
* Add changelogs requested by linter
* Add changefile(s) from automation for the following project(s): @woocommerce/components, woocommerce
* Remove mention of Jetpack from ExperimentalShippingRecommendation
* Fix text wrapping bug in WC Tax onboarding task
* Add changefile(s) from automation for the following project(s): @woocommerce/components, woocommerce
* Use isResolving() to detect pending auth URL fetch
* Replace unused hasErrors with ref to error
* Fix lint
* Jetpack auth URL prefetching
* Revert "Jetpack auth URL prefetching"
This reverts commit 2b79000e20.
* Add PrefetchJetpackAuthUrl component to remove Connect button load time
* Replace URL prefetching in component with useEffect
* Fix: Accept redirect URL as param instead of prop
* Fix lint
* Remove prefetching. Make Connect button always available
* Fix ExperimentalShippingRecommendation incompatibility with new Connect behavior
* Handle empty object errors in Connect
* Display TOS above WooCommerce Shipping & Tax installation buttons (#40863)
---------
Co-authored-by: github-actions <github-actions@github.com>
- Changed illustrations for extensions and themes no results.
- Added bottom border to theme images in product cards, as many themes have white backgrounds.
- Reduced font size and font weight of suggested products titles in no results.
* Invalidate variations upon generation and fix formatted name
* Add aditional invalidates to keep cache up to date
* Update formatted name to always return attribute term name list
Only setting default category `_all` for `search` view if `product_type` (i.e. `query.section`) is also set. The previous arrangement was setting the `_all` category on the initial search results, where category doesn't figure.
Removed `! props.view` from condition in `recordLegacyTabView`. It meant that the initial default marketplace view wasn't being recorded.
Solve issue with some default prop values
We were no longer sending through a property to determine the "view" or "section" (depending on which event version you're referring to) when loading the discover page.
This change ensures that there is always a fallback that resolves this.
Also fixed some linting issues and cleaned up redundant code.
Removed unused import.
Removed default values from `marketplaceViewProps` – we are now handling this in the tracking function.
Changed `selectedTab` dependency of `useEffect` hook in content.tsx to `query?.tab`. The `selectedTab` state was being reset after (or at least not at the same time as) the change of the tab param in the query string. For this reason, we were recording two page views when you changed from Extensions tab and Shipping category to Themes tab. This doesn't seem to break anything! We are still setting the `selectedTab` based on the query string in the `Tabs` component, so they should still be in sync.
Removed the condition skipping marketplace page view when there was no `prop.view`. This meant that when you switched to the Discovery tab from another tab, we weren't recording the page view.
Also setting default category prop `_all` when no category is specified on extensions, themes and search tabs. This allows us to bundle the default views of those tabs with the views got by clicking on the "All" category link.
Addressing linter errors.
* Link site icon to Woo Home
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove green/yellow color palette from pattern assembler
* Remove Lemon Myrtle
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Save the session early before proceeding with order payment.
As part of the checkout process an order is created and the order id
is stored in a session variable right before requesting payment
processing to the appropriate payment gateway. Thus if the payment
fails and the user submits the order again, the order id will be
picked from the session so the existing order can be retrieved and
updated.
However if the payment process hangs (instead of returning an error)
and the request never finishes the session data will never actually
be sorted, and the next time the user submits the order a duplicate
of the first order will be created.
This commit simply does WC()->session->save_data() after the
WC()->session->set that stores the order id, so that the session is
effectively updated even if the request hangs.
* Add changelog file
* Adds WooCommerce Endpoints documentation
* Removes images from `woocommerce.com` domain.
* Embed code directly into markdown instead of using gists.
* Adds images to the document.
* Adds changelog file
* Move the document to the right folder.
* Fixes markdown lint issues
* Create product page skeleton
* Load skeleton in product and variation pages
* Let each page to define own loading/skeleton when the router is resolving the page.
* Add changelog files
* Fix linter error
* Fix unit test
* Add disconnected state
* Add changefile(s) from automation for the following project(s): woocommerce
* Added top margin to `.woocommerce-store-alerts` to address https://github.com/Automattic/woocommerce.com/issues/18448.
* Rename description class
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Use slugs to identify installed products
* Show installed .org products as active
* Add changefile(s) from automation for the following project(s): woocommerce
* Update plugins/woocommerce/includes/admin/helper/class-wc-helper.php
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Update plugins/woocommerce/includes/admin/helper/class-wc-helper.php
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Update plugins/woocommerce/includes/admin/helper/class-wc-helper.php
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Update plugins/woocommerce/includes/admin/helper/class-wc-helper.php
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Remove org product activation
* Linter fix
* Linter
* Show only one unconnected item
* Linter fixes
* Update plugins/woocommerce/includes/admin/helper/class-wc-helper.php
Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
Code on line 620 has error Trying to get property 'ID' of non-object . you should use if($post instanceof WP_Post) in your condition instead if($post);