* Set product card price currency and suffix dynamically based on endpoint data
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove unnecessary comment
* Update types to match data received from WCCOM after further changes to the API
* Apply suggestions from code review
Allow for future currencies that might switch the symbol/value order
Co-authored-by: Dan Q <dan@danq.me>
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dan Q <dan@danq.me>
* Remove Marketplace feedback modal which is no longer used
The goal of the modal was not to be shown after 2023 (see https://github.com/woocommerce/woocommerce/pull/39609),
so we can remove it from the codebase now. Especially that it's a bit buggy - snackbar prompting for feedback
is displayed but the modal is not there because of the check for FEEDBACK_DIALOG_CAN_APPEAR.
* Marketplace Subscriptions - rename columns
* Marketplace subscriptions - show status badge in the Subscription column
Additionally, we remove the info icon from the status popover
* Marketplace subscriptions - add button helping to turn renewals on
* changelog
* Add focus handlers for accessibility
* Remove unused variable
* Fix sharing path url - My Subscriptions
* Change the status badge priority for expired
We should show the expired badge first, as it makes more sense with the
primary action.
---------
Co-authored-by: raicem <cem.unalan@automattic.com>
Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
* Support for Business Services in in-app marketplace ()
Contains the changes from:
#46530#46725#47048#47135#47183#47227#47352#47452
* Update plugins/woocommerce-admin/client/marketplace/README.md
Fix documentation punctuation
---------
Co-authored-by: Raja Sekar Manimaran <raja.sekar.manimaran@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>
Co-authored-by: Dan Q <dan@danq.me>
* Freemium: update marketplace product card label
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Marketplace: Add "Add to Store" button for free and WordPress.org products (#43616)
* Marketplace: Install free .org plugins with Add to Store button
* Marketplace: addressed feedback for the the new install free products flow
- Moved notices to the top of the modal
- Updated notice styles slightly
- Updated the CreateOrderSuccessResponse to reflect API changes
* Marketplace: Require the Helper orders API file
* Marketplace: fix linter errors
* Marketplace: form encode when submitting the request
The body is encoded anyways by the WordPress core. However, if I don't
do it here, I can't create a valid signature to be verified by
Woo.com.
I could have just submitted a JSON too, but this seamed easier since
the body is parsed on Woo.com automatically when it's in this form.
* Add changefile(s) from automation for the following project(s): woocommerce
* Marketplace: remove "~" character in imports and use relative paths
* Marketplace: fix margins in the product with the Add to Store button
* Marketplace: Add conditions to hide the button
We hide it if:
- the product is already installed
- user doesn't have the right capability
- if the product is just installed using our flow and there is
no page refresh
* Marketplace: don't show Add to Store button on Themes and on Discover
* Marketplace: fix linting
* Marketplace: hide ratings from the product if "is-small" class exists
* Marketplace: fix linting errors
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add rating and change product card layout
* Fix some minor CSS bugs in existing code
* Implement skeleton loader
* Update theme card styling to match design
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Installer url API
* Redirect if installer not available
* Remove paid product autoinstall support
---------
Co-authored-by: github-actions <github-actions@github.com>
* Not connected screen fixes
* Table improvements
* Success notice icon
* Use the same layout of columns for both tables
* Popover
* Add changefile(s) from automation for the following project(s): woocommerce
* CSS lint fixes
* Styling tweaks. Changed font-weight of `.woocommerce-marketplace__product-list-title` to 400, to correspond with the correct weight of the titles like "Installed on this store" in the My Subscriptions section.
* Undo refresh move
* Fix subgrid max widths
* Fic status height
* Update collaborate link
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@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>
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.
* 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>
* Marketplace: Fix issues with copy on the My Subscriptions page
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
Co-authored-by: berislav grgičak <berislav.grgicak@gmail.com>
* Marketplace: Use $grid-unit variables in SCSS
* Marketplace: fix the build error a missing module
* Linter fixes
---------
Co-authored-by: berislav grgičak <berislav.grgicak@gmail.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
* Marketplace: Add the right URL parameters to product URLs
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: raicem <unalancem@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
- `ProductListContextProvider` provides `setIsLoading` function as well as `isLoading`.
- `Discover` uses these values from context, instead of keeping a loading state in itself.
- `FeedbackModal` calls `maybSetTimeout` when `isLoading` changes. If `isLoading` isn't truthy, and snackbar hasn't already rendered, it sets a timeout of 5 seconds to show it.
- Removed wrapping <WooFooterItem> from around Footer component, so it's no longer a child of the WooCommerce Admin `.woocommerce-layout__footer` footer.
- Removed the `position: relative` from `.woocommerce-layout__footer`. It needs to be `position: fixed`.
- Added FooterContent component to Footer, to allow the layout we want.
- Changed use of context. This now only has states for the selected tab and loading state.
- We use this context in `Tabs` and `Content` to keep track of which tab is selected, and set the selected tab.
- We also use it in `Discover` and `Extensions`, which both report loading state to the context. This allows us to use it to only render the snackbar when loading is complete.
- Extensions: moved `productList` and `setProductList` and logic for getting product list from the context provider to a state in this component. We don't need to share the list of products in the context.
- Renamed `ProductListContext`, `ProductListContextProvider` and `productListContextValue` to more generic `MarketplaceContext`, `MarketplaceContextProvider` and `marketplaceContextValue`.
- Renamed a constant and created constants for API paths.
- Only shows snackbar after content has loaded, and after a timeout. We set a date `marketplace_redesign_2023_last_shown_date` in local storage to ensure we only show one snackbar.
We were hitting the WCCOM API directly from the front end. However,
that limits of in terms of caching and reducing the load on WCCOM.
To prevent that, we added a REST API endpoint. This endpoint
fetches discover page content from WCCOM and puts in a transient.
This is actually how the page works in the previous version. So
we were able to reuse a lot of the code.