Commit Graph

3661 Commits

Author SHA1 Message Date
Fernando 1e1daaa6bb Added check to show WC Pay option only when Jetpack is connected (https://github.com/woocommerce/woocommerce-admin/pull/4105)
* Added check to show WC Pay option only when Jetpack is connected

A verification was added to the Setup Checklist payment step, to show WC Pay option only when Jetpack is connected

* Changed the solution approach

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-04-10 11:10:47 +12:00
Fernando 866487ee27 Bugfix on payments step in CBD flow (https://github.com/woocommerce/woocommerce-admin/pull/4061)
* Bugfix on payments step in CBD flow

The `array_search` method was changed to `in_array`

* After pressing Connect a new tab opens with the Square webpage

* Updated behavior for non CBD Square payment connection

* Square option's name updated

* Replaced <p> tag with a <div> tag

Since there was a `validateDOMNesting` warning because we weren't adding only text inside a <p> tag, the `p` tag was changed to a `div`.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-04-08 16:17:32 -07:00
Allen Snook 8b730e6f18 Enable wcpay feature flag in plugin and core (https://github.com/woocommerce/woocommerce-admin/pull/4046) 2020-04-08 16:16:09 -07:00
Jason Conroy fa873892dd Add missing prompts to installed extensions (https://github.com/woocommerce/woocommerce-admin/pull/4060)
* Add support for additional partner extensions to installed extensions

* Use correct variable name

* Add codisto support url

* Fix hubspot svg

- Fixes orange color as per brand guide
- Reduces file size from 120kb to 1kb

* Replace Google logo with vector SVG

* Fix AutomateWoo icon

* Fix Amazon Ebay svg icon

Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com>
2020-04-09 08:43:34 +09:30
Timmy Crawford acfae2c356 Setup Checklist: Remove Setup Menu Item and I'll Do This Later link (https://github.com/woocommerce/woocommerce-admin/pull/4085)
* Remove  menu item

* Remove 'do this later' link
2020-04-08 14:27:24 -07:00
Steve Grunwell 27704012a6 Enable the default homepage template to be filtered (https://github.com/woocommerce/woocommerce-admin/pull/4072)
This commit adds the "woocommerce_admin_onboarding_homepage_template" filter, enabling themes/plugins to filter the default homepage template created by the WooCommerce onboarding process.
2020-04-09 09:26:03 +12:00
Jason Conroy 05cf7b010e Marketing inbox note (https://github.com/woocommerce/woocommerce-admin/pull/4030)
* Add Marketing Note Provider Class

* Add marketing note intro to events

* Include Market Notes with feature plugin

* Change marketing into note title

* Remove facebook extension inbox note

* Remove onboarding completed (market my store) inbox note

* Add inline comment back in

* Remove constructor

Install method doesn’t exist

* Remove unnecessary use of WC_Admin_Notes_Marketing

* Change marketing hub note to use speaker gridicon

* Remove facebook note on update to 1.1.0
2020-04-09 05:55:59 +09:30
Ron Rennick cd9ee95c32 remove use of undefined QUEUE_GROUP (https://github.com/woocommerce/woocommerce-admin/pull/3994)
* remove use of undefined QUEUE_GROUP

* remove unsnooze action from both queue groups
2020-04-08 15:38:15 -03:00
Timmy Crawford 28a43f18c1 Setup Checklist: Fix exception in shipping. (https://github.com/woocommerce/woocommerce-admin/pull/4071) 2020-04-08 08:19:38 -07:00
Joshua T Flowers 94eec721c0 Fix double prefixed wcadmin events (https://github.com/woocommerce/woocommerce-admin/pull/4065) 2020-04-08 14:35:16 +03:00
Timmy Crawford 2cce38db88 Update Jetpack Autoloader. (https://github.com/woocommerce/woocommerce-admin/pull/4068) 2020-04-07 16:21:34 -07:00
Jeff Stieler ecd0568c8c OBW: fix use of unbound this in business details step. (https://github.com/woocommerce/woocommerce-admin/pull/4070) 2020-04-07 12:08:17 -06:00
Jeff Stieler 851d826634 Replace welcome image on marketing tab with svg. closes woocommerce/woocommerce-admin#4057 (https://github.com/woocommerce/woocommerce-admin/pull/4066)
Co-authored-by: James Koster <james@jameskoster.co.uk>
2020-04-06 16:39:18 -06:00
Matt Sherman b996b69b6f Fix RTL issues with `wc-admin` pages (https://github.com/woocommerce/woocommerce-admin/pull/4051)
* Flip summary item's delta 'right' arrow when RTL
* Prevent chart legend checkbox from flipping in RTL
* Flip store alerts pagination arrows in RTL
2020-04-03 07:26:24 -04:00
Gregory Karpinsky d0697d6ce9 Removed duplicate array entry (https://github.com/woocommerce/woocommerce-admin/pull/4049) 2020-04-03 10:47:32 +10:00
Paul Sealock cb4ba39e30 Dynamic Currency with Context API (https://github.com/woocommerce/woocommerce-admin/pull/4027)
* Make currency setting dynamic with context API

* reference Currency

* what is 'this'

* remove comment

* All report tables

* Customers report

* activity panel

* leaderboard test

* business details

* store details

* single source of truth

* shipping rates

* remove currency-format.js

* tidy up

* make Currency a factory function

* factory revenue table

* tables

* Chart y-axis labels

* customers table

* cleanup

* business details

* shipping

* number-format

* stock and downloads tables

* changelog

* cleanup

* SQL example: update to dynamic currencies (https://github.com/woocommerce/woocommerce-admin/pull/4033)
2020-04-03 10:54:38 +13:00
renovate[bot] ac52cf7f92 Pin dependency @wordpress/data-controls to 1.8.2 (https://github.com/woocommerce/woocommerce-admin/pull/4038)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-02 11:40:10 +10:00
renovate[bot] 90a898d971 Update dependency qs to v6.9.3 (https://github.com/woocommerce/woocommerce-admin/pull/4041)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-02 10:30:30 +10:00
renovate[bot] 782d2ac468 Update dependency lint-staged to v10.1.1 (https://github.com/woocommerce/woocommerce-admin/pull/4040)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-02 10:24:52 +10:00
renovate[bot] 414693983b Update dependency ast-types to v0.13.3 (https://github.com/woocommerce/woocommerce-admin/pull/4039)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-02 10:20:52 +10:00
Barry Hughes 801cd357a0 Cast to float, to avoid performing arithmetic with strings (https://github.com/woocommerce/woocommerce-admin/pull/4042) 2020-04-01 16:09:38 -03:00
Matt Sherman ee0eec8a40 Support IE11 in `wc-admin` (https://github.com/woocommerce/woocommerce-admin/pull/4037)
* Include `marked` in node_modules run through babel
* Fix adding of `Setup` menu item in IE11
2020-04-01 12:03:13 -04:00
Jason Conroy e78a4bc2db Update marketing hub recommended plugins API url. (https://github.com/woocommerce/woocommerce-admin/pull/4036)
* Update recommended plugins WCCOM url

* Remove todo.

Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-04-01 08:37:01 -07:00
Brent Shepherd 7cf441038f Update WC Pay Dev Mode doc link (https://github.com/woocommerce/woocommerce-admin/pull/4026)
Updates placeholder doc link added in woocommerce/woocommerce-admin#3978
2020-04-01 08:26:50 -07:00
Joshua T Flowers 1f7ca63289 Onboarding: Remove plugins step from profiler (https://github.com/woocommerce/woocommerce-admin/pull/3974)
* Use plugin component with autoinstall in benefits step

* Cache plugins to install to prevent render changes on install

* Add busy state to button when installing

* Prevent multiple requests being fired when awaiting next step

* Disable buttons when actioned
2020-04-01 08:24:51 -07:00
renovate[bot] 2df51c5cbb Lock file maintenance (https://github.com/woocommerce/woocommerce-admin/pull/4025)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-01 12:27:32 +10:00
Jeff Stieler 92a0f19058 Update default dashboard view. (https://github.com/woocommerce/woocommerce-admin/pull/4035)
* Hide some more performance indicators by default.

Don't show: AOV, Returns, Gross Sales.

* Fix default hidden dashboard chart identifiers.

They were missing the expected endpoint prefix.
2020-03-31 18:58:06 -06:00
Jeff Stieler 0fd403ea20 Fix aria-label attribute. (https://github.com/woocommerce/woocommerce-admin/pull/4034) 2020-03-31 18:57:40 -06:00
Matt Sherman 3037eb6f35 Show admin notices on embedded pages. (https://github.com/woocommerce/woocommerce-admin/pull/4019) 2020-03-31 19:38:42 -04:00
Jeff Stieler f8bc173cfb Only query requested stat totals in reports. (https://github.com/woocommerce/woocommerce-admin/pull/4009)
* Pass specified totals/intervals fields parameter to the Order Stats Query.

* Only request stats used in render for report summaries and charts.

Implement Orders as an example.

* Specify stats fields for all report requests.

* Add 'fields' parameter handling to all stats endpoint controllers.

* Reduce stats fields requested by dashboard charts.
2020-03-31 09:08:40 -06:00
Fernando 5242560972 Added hook to delete woocommerce_onboarding_homepage_post_id (https://github.com/woocommerce/woocommerce-admin/pull/4015)
* Added hook to delete woocommerce_onboarding_homepage_post_id

Added hook to delete woocommerce_onboarding_homepage_post_id when the homepage is deleted.

* Moved post type check further up in the method

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-03-31 11:57:01 -03:00
Brent Shepherd 44af89a12e Add WooCommerce Payments Inbox note (https://github.com/woocommerce/woocommerce-admin/pull/4013)
* Add WC Pay to allowed plugins

* Add WC Pay Note to Inbox

* Don't update WC Pay note content

Actioned notes are hidden from the Inbox it turns out, so there's
no need to update the content to reflect that the WC Pay plugin
has been installed.

* Add WC pay note only after April 14

Instead of only adding the Install Now button in April. Only
add the note so that the Install now button is always available
and generally, the note is more useful and actionable because
the plugin is actually available.

* Fix WC Pay note install action

* Check if WC Pay is active or installed

Not just if the plugin files are available. This addresses both the
case where the plugin may be active an in a different folder name,
and where the plugin may have been installed but is not active,
likely because it's been deactivated.
2020-03-31 05:59:48 -07:00
Allen Snook a33a65222c Use a Recommended pill (not a ribbon) for WooCommerce Payments (https://github.com/woocommerce/woocommerce-admin/pull/4024)
* Use recommend pill not ribbon for wcpay

* Tweak CSS, dark purple too plz
2020-03-31 05:58:11 -07:00
Jason Conroy e5bd8f3184 Marketing Tab MVP (https://github.com/woocommerce/woocommerce-admin/pull/3953)
* Add Marketing feature flag

* Add marketing page and menu item

* Register marketing page with layout controller

* Add initial marketing cards

* Add max-width to marketing overview page

* Add initial marketing WelcomeCard component

* Make marketing welcome card permanently dismiss

* Add a readme for the marketing page components

* Record tracks event when marketing welcome dismissed

* Match design width

* Add welcome image and initial styles

* Use gridicon for close button

* Fix whitespace

* Add PluginsHelper::get_plugin_data()

* Add initial Marketing\InstalledExtensions class

* Preload installed marketing extensions data

* Tweak extension statuses

* Add InstalledExtensionRow component

* Add initial extension data to InstalledExtensions card

* Refactor PluginsHelper::get_plugin_data method

Using the new get_plugin_path_from_slug method

* Ensure get_plugins() function is available for PluginsHelper

* Simplify using PluginsHelper method

* Add MailChimp configured status logic

* Add links to InstalledExtensionRow component

* Add key prop to extensions list

* Setup styles for InstalledExtensions card

* Display nothing if no installed extensions

* Add InstalledExtensions::get_allowed_plugins()

* Setup Marketing Overview API controller

* Add /activate-plugin marketing endpoint

* Add more extensions URL props

* Add Facebook extension configured status logic

* Update Facebook extension URL props

* Fix extenion data logic

* Move component into it’s own directory

* Setup /marketing/overview/recommended endpoint

* Initial marketing page card header styles

* Add basic extension data to RecommendedExtensions

* Use color as variable

* Tweak card header padding for design

* Add basic styling to RecommendedExtensions card

* settingsUrl is not available if the plugin is not active

* Add /marketing/overview/installed-plugins REST endpoint

* Add basic activation functionality to InstalledExtensions component

* Don’t throw error on success

* Add MVP data store for installed extensions card

* Add core dark blue color variable

* Add styles for installed extensions card

* Move knowledge-base component to its own directory

* Pull recommended marketing plugins from remote test site

* Hide description when configured

As per design

* Tweak colors based on design

* Finish off styling for RecommendedExtensions

* Limit recommended extensions to 6 items

* Add error handling to RecommendedExtensions card

* Rename ‘copy’ extension prop

* Add marketing button component to match design

* Create ProductIcon component for marketing

* Add InstalledExtension icons

* Fix icon image paths

* Add ProductIcon to InstallExtensionRow

* Final styling to installed extensions card row

* Knowledge base card placeholders

* Fix missing icons when plugin not activated

* Remove logging

* Tweak array structure to ensure we have an array in JS

and not an object

* Refactor KnowledgeBase marketing component

- We don’t need loop through every post when rendering, just pick the posts we need
- Remove unused classes

* Move padding from each slide to the container

* Improve slider animations by absolute positioning the slides

* Reduce the slider animation timeout and add a note

* Add in-app purchase flow url params for recommended extensions

* Fix slider animation

* Reset slider height on window resize

* Short slider animation, fix double margin on smaller screens

* Add initial marketing/knowledge-base endpoint

* Pull knowledge base posts from API

* Rename welcome card dismiss tracks event

* Record event on recommended product click

* Recond onclick events for installed extensions card

* Record event when carousel navigation clicked

* img elements must have an alt prop

* Remove import that is never used

* use camelCase

* Decode HTML entities from API call

* Remove unused container div

* Add card loading state

* Add images to knowledge base card

* Link knowledge base posts

* Use the Pagination component rather than duplicate it’s functionality

* Clean up and rename knowledge base slider

* Clean knowledge base CSS and update responsive styles for single post slide

* Add a README for button component

* Add README for product icon component

* Add initial readme for Slider component

* Add correct image sizes to knowledge base slider, finalize styles

* Fix extension link urls

* Resolve some code formatting issue

* Bind class click methods to this

* Wrap nodes in Fragment

* Fix wccom-back path

* Add placeholder author and gravatar

Default avatar url size returned from the API is currently set to 96 so I’ve done a simple replace with 16

* Fix style-lint expected new line

* Add docblock for get_knowledge_base_posts()

* Setup data store for marketing to handle installedExtensions card

* Fix function names

“Activating” not “installing”

* Move welcome card component to its own dir

* IconButton component is going to be deprecated

ref: https://github.com/WordPress/gutenberg/pull/19299

* Support multiple activating plugins in the data store

* Rename extension to plugin for consistency

* Add propTypes to component

* Rename data-store/ to data/

* Fix import paths

* Extract isActivatingPlugin logic into datastore

* Move data store selectors into own file

* POST requests are not cached

* Export apiFetch action

* Don’t wrap API response in object

* Implement data store for recommended extensions

* Implement data store for marketing knowledge base

* Tidy getRecommendedPlugins resolver

* Try a cross browser cover/crop image effect to fit proposed design

And help fit longer titles in

* Add caught errors to handler

* Adjust positioning so watermater is displayed

* InstalledExtensions phpcs fixes

* Marketing phpcs fixes

* Alignment fix

* MarketingOverview phpcs fixes

* Missing full stop

* Update breadcrumbs to use new approach

* Fix style lint issues

* Record `marketing_knowledge_article` track event on knowledge base post click

* Import apiFetch and controls from @wordpress/data-controls

* Hex color to lowercase

* Remove duplicate method after rebase

* Use new showPageArrowsLabel rather than hide with CSS

* Fix blurry avatars on hidpi displays

* Hide avatar if URL is falsy

* Replace test author data with live data

* Combine conditionals into ternary

* Combine conditionals into ternary

* Simplify class column logic

* Only preload option and component settings in the admin

* Fix isActivatingPlugin not updating

Component was not re-rendeding.

* Use querySelector over getElementsByClassName

* Hide Marketing Welcome Card immediately on click

* Use create-a-ticket url for supportUrl and make that the default

* Add getInstalledPlugins resolver with preloaded data

* Revert "Add getInstalledPlugins resolver with preloaded data"

This reverts commit b8b127ec6411bef15616576b3bb189dc31777c13.

* Load plugin data in a separate request after activation

* Update welcome image

* Don’t return plugin data in the activation request.

* A space is required before closing bracket

* Update Jest config to gracefully handle static assets

Ref: https://jestjs.io/docs/en/webpack#handling-static-assets

* Remove unused onExit property

* Remove placeholder README

* Use prop directly

* yield createNotice

* Add note to indicate which Category

* Increase transient time to 3 days

* Use $gap-small

* Add proptype

* Add debounce to slider height resize listener

* Clean up isLoading logic

* Dont show image elements if image data is empty

* Open knowledge base posts in a new window

* Add “noreferrer”

* Turn the tab on in all env

Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com>
2020-03-28 06:48:27 -07:00
Allen Snook 078de3e9c0 Merge add/wc-pay to master, enabled for development only (https://github.com/woocommerce/woocommerce-admin/pull/4022)
* Add feature flag for wcpay (https://github.com/woocommerce/woocommerce-admin/pull/3958)

* Add card to payments task for WooCommerce Payments (https://github.com/woocommerce/woocommerce-admin/pull/3978)

* Add card to payments task for WooCommerce Payments

* Add missing plugin and settings PHP constants for woocommerce payments

* Add endpoint to return url to kick off wcpay

* Fix incorrect option name

* I can haz purple with white text, plz

* Linkify TOS, settings

* Recommend wcpay when visible; move wcpay to list top

* Test for wcpay feature flag

* Improved handling of feature flag

* If the user is an agency, include wcpay docs link on card

* Reverse agency logic, LOL

* Camel case fillRule etc

* Turn off wcpay for core and plugin for now
2020-03-27 16:24:32 -07:00
Jeff Stieler 85f5a7c927 Avoid making redundant requests for performance indicators. (https://github.com/woocommerce/woocommerce-admin/pull/3997) 2020-03-27 17:16:32 -06:00
Fernando Espinosa b71bc861fb WooCommerce Shipping order page prompt (https://github.com/woocommerce/woocommerce-admin/pull/3955)
Co-authored-by: David Stone <david@nnucomputerwhiz.com>
Co-authored-by: Chris Shultz <chris.shultz@automattic.com>
Co-authored-by: Harris Wong <harris.wong@a8c.com>
2020-03-27 13:42:58 -07:00
Albert Juhé Lluveras b50ad35d63 Remove icon-button classes from Tag component (https://github.com/woocommerce/woocommerce-admin/pull/3993) 2020-03-27 20:08:35 +01:00
Jeff Stieler f13b9f334f Reduce queries in Orders Panel. (https://github.com/woocommerce/woocommerce-admin/pull/3969)
* Allow on-demand retrieval of order line items in REST API.

* Orders Panel: reduce response fields from orders endpoint.
2020-03-27 13:01:19 -06:00
Matt Sherman 0f18d6a326 Change "Google Shopping" to "Google Ads" and update Google Ads logo (https://github.com/woocommerce/woocommerce-admin/pull/4007) 2020-03-27 13:18:27 -04:00
Paul Dechov 0e5cfb23c0 Onboarding: only validate other platform name for 'other' selling venues (https://github.com/woocommerce/woocommerce-admin/pull/4011)
Omit validation error (and resulting disabled "Continue" button) on the other platform name text field, in an edge case where the field is first required but value is missing, and then no longer required.
2020-03-27 11:57:25 -04:00
Jason Conroy d237256aa9 Abstract onboarding plugin code into a PluginsHelper class (https://github.com/woocommerce/woocommerce-admin/pull/3999)
* Abstract WP plugin code into a PluginsHelper class

We plan to use these methods in the Marketing tab.

* Add PluginsHelper::is_plugin_active()

* Add PluginsHelper::is_plugin_installed()

* Add PluginsHelper::get_plugin_data()

* Add PluginsHelper::get_plugin_path_from_slug()

* Refactor PluginsHelper::get_plugin_data method

Using the new get_plugin_path_from_slug method

* Refactor is_plugin_installed and is_plugin_active

Also adds support for plugin slugs or paths as parameters.

* Ensure get_plugins() function is available for PluginsHelper

* Ensure plugin path is a string before checking if installed/active

* PHPCS fixes

* Add initial unit tests for PluginsHelper

* Check plugin data array keys rather than all values

Will make it less fragile when Woo plugin data changes

* Fix typos

Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com>
2020-03-27 11:28:59 +10:30
Daniel Bitzer 67b4df2356 Add showPagePicker, showPerPagePicker props to Pagination component (https://github.com/woocommerce/woocommerce-admin/pull/3980)
* Add showPagePicker, showPerPagePicker props to Pagination

* Add new Pagination props to readme

* Add Pagination component story

* Move lonely moustache

* Add property for enabling/disabling the page arrows label

Co-authored-by: Jason Conroy <jason@findingsimple.com>
2020-03-27 11:24:51 +10:30
Fernando 5264523d87 "Personalize your store" reminder: new inbox notification (https://github.com/woocommerce/woocommerce-admin/pull/3895)
* Added note to Personalize Store

Added note to Personalize Store, 5 days after registration or when the user completes the task list.

* Lint repeared

Lint error repeared.

* Moved homepage_id < 0 check to OnboardingTasks.php

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-03-26 17:07:54 -03:00
Matt Sherman ae0ceaf900 Ignore *.swp files (https://github.com/woocommerce/woocommerce-admin/pull/4004) 2020-03-26 11:19:55 -04:00
Paul Sealock 774967fced Storybook: point to correct folder (https://github.com/woocommerce/woocommerce-admin/pull/4001) 2020-03-26 11:36:26 +13:00
Jeff Stieler 9bbe5f1907 Verify coupon dates are DateTime instances before trying to format them. (https://github.com/woocommerce/woocommerce-admin/pull/3984) 2020-03-25 08:18:44 -06:00
renovate[bot] 58e1f71183 Update dependency qs to v6.9.2 (https://github.com/woocommerce/woocommerce-admin/pull/3991)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-25 16:49:11 +13:00
renovate[bot] 66def04996 Update dependency marked to v0.8.2 (https://github.com/woocommerce/woocommerce-admin/pull/3990)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-25 16:43:09 +13:00
renovate[bot] d76923c87f Update dependency lint-staged to v10.0.9 (https://github.com/woocommerce/woocommerce-admin/pull/3988)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-25 16:41:57 +13:00