* Install task to update selected notes if they need to be changed
* Add comment for filter
* Add some extra comments to explain things a little better
* Undo my implementation of modifying notes
* Add a SQL script to update deactivate plugin note type
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Make API init class a singleton.
For aid in testing.
* Use static Jetpack methods instead of the REST API to get active modules.
Include some helper methods for easier testing.
* Fix Jetpack module mocking in indicators test.
* Check for the expected Jetpack module method before calling.
* Ensure active Jetpack modules is an array.
* Build: Only load non-minified js assets when they are available in the build.
* Avoid multiple Loader instances.
* Fix feature filter name in test bootstrap.
* Fix feature filter used in Loader tests.
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
* Added new note type
This commit adds a new note type `survey`. The note is deleted after calling its CTA.
* Now using const from WC_Admin_Note
* Now using const from WC_Admin_Note in WC_Admin_Notes too
* Moved note deletion from NoteActions to WC_Admin_Notes
This commit moves the note deletion from NoteActions to WC_Admin_Notes. Also adds a hook to clean up actioned survey notes.
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Add simple business extension install form input
* Install all business extensions when checked
* Add popover with business extension benefits
* Remove errant hasInstallActivateError setState call
* Show popover on click and record event
* Show success screen based on conditions instead of step
* Use promise chain to handle updating tax settings
* Fix up error handling for failed setting updates
* Skip store location step if complete address exists
* Fix up pending/requesting state logic
* Allow opt in to TOS on tax task
* Don't complete task from completeStep
* Add caption styling to TOS text
* Preventing refresh after answering a survey note
This commit adds the code necessary to prevent a webpage refresh after answering a survey note.
* Modified `action` URL check
This commit refactors the check we do for the action URL.
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Fix missing uninstall usage in tests bootstrap.
Update test bootstrap using latest core WC version.
* Fix date offsets for test orders.
* Restore original test lib directory logic.
* Ensure that test runs near the bottom of the hour don't break.
* Update testing instructions in contributing docs.
* Added event prop to be recorded
This commit adds the event prop `screen` to `wcadmin_wcadmin_inbox_action_click`
* Getting screen name from referer
Now the we get the screen name from the referer
* The screen name is not being sent anymore to the API
The screen name is not sent anymore to the API. Also, the $screen_name is set as empty in the API to make the method more defensive.
* Created method `get_screen_name`
This commit moves the code related to getting the screen name to a specific method.
* Added screen name recording for individual posts
This commits adds screen name recording for individual posts
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Add (failing) test for deleted coupon amounts in reporting.
* Always sync an ID into the order-coupon lookup table.
* Don't remove coupon data from order analytics when the coupon is deleted.
* Fix coupon ID lookup from order item metadata.
* Allow negative coupon_id in the lookup table.
Representing deleted coupons.
* Handle deleted coupons when gathering extended info.
* Add more tests for deleted coupon handling.
* Handle deleted coupons in coupons report table.
* Fix lint errors.
* Add advanced args to configured static args so it is persistent
* Make sure unique keys are set in loaded labels
* Simplify the key selection because javascript
* Smarten up the filter picker so it only navigates if the selected button has changed
* Add static params for advanced order filters
* Add static param to product comparison config
* Add static param to category comparison config
* Add static param to coupon comparison config
* Add static param to taxes comparison config
* Add static params to downloads comparison config
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Bring homescreen styles into task list so it is styled correctly in the dashboard view
* Copy homescreen card styles to new .woocommerce-dashboard-card class
* Move styles to dashboard stylesheet.
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
* Tweak the embed page CSS so the top content sits better
* Tweak the CSS to take notices into consideration
* Further tweak header styles
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Fix spacing between stats overview and store management cards
* Revert "Fix spacing between stats overview and store management cards"
This reverts commit 993374313657f7ecf7803cc738b82bf63ecdf490.
* Home screen div margins
* Fix: Actioned inbox notifications now are visible
This commit fixes the actioned inbox notifications, now they are always visible.
* Fixed getUnreadNotes method
This commit fixes the getUnreadNotes method since it was returning the wrong information.
* Added two @todo
This commit adds two @todo referring to a few changes to do after implementing pagination
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
This commit adds a new notification to customize the client store with WooCommerce blocks
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Count total unique customers instead of new/returning in order stats
* Add customer name to table instead of customer type
* Add customer total to segments
* Update tests for new stats
Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
* Add Insight note
* Change actioned_label to actioned_text
* Move actioned text up a level
* Fix comment
* Rename insight class
* Add deny action to insight first sale and fix the button actions
* fix spacing
* Tweak conditions in the inbox card
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Fix secondary button style in OBW.
* Center snackbar notices in OBW.
* Scope snackbar changes to just the OBW.
* Add busy treatment to Jetpack connect button when redirecting.
* Remove color override for form toggles in ellipsis menus.
* Fix styling of task list.
* Fix button styles in date range picker component.
* Use admin theme colors in calendar component selections.
* Fix datepicker styling on analytics settings page.
Add Timeline component
The overall component is split into smaller components:
* Timeline item: an individual item (event) for the timeline.
* Timeline group: a group of items grouped according to props.
See README.md for prop details.
Ordering and grouping is decided via props. Component also
exports helper objects to make it easier to pass in the correct
props for ordering and grouping.
Item titles and bodies can be passed in as either strings or
React elements. Icons must be React elements.
Has a storybook scenario along with unit and snapshot tests.
Co-authored-by: Valerie K <valerie@automattic.com>
Co-authored-by: Allen Snook <allen@allendav.com>
Co-authored-by: Kristófer R <kristofer.thorlaksson@automattic.com>
Co-authored-by: David Levin <davidlevin@Davids-MacBook-Pro-2.local>
* Don't attempt order download information retrieval when the product has been deleted.
* Handle display of download names when product has been deleted.
* Add deleted product test case for download report endpoint.
* Fix date() usage in download report tests.
* Handle new object for posts and recommendations
* Set breadcrumb parent for woocommerce-coupons to be woocommerce-marketing
* Add main coupon wrapping component
* Render coupon wrapper element below coupon table using wp-admin-scripts
* Finish off implementing category param for data store resolvers
* Create a helper trait for legacy coupons
* Add coupon related titles and descriptions
* Add note for the coupons being moved
* Allow for querying by note name in the notes Data Store
* Revamp coupon moved trait
* Add the new note only if we don't have an unactioned note and perform a redirect to ensure menu updates
* set_icon is deprecated
* Move coupon menu, adding a note for customers
* Translate title and descriptions
* Whitespace
* Account for coupon functionality being disabled
* Hide legacy menu before redirect
* Don’t keep adding the note if customer dismisses it from inbox
* Move behind feature flag
* Add note if feature enabled
* Add filter to override coupon feature
* Tweak option name to refer to wc_admin
To help with finding etc.
* use css variables
* Add the new note only if we don't have an unactioned note
* Switch the filter logic so `false` turns off the feature
This is a bit more intuitive when utilizing the filter
* Remove extraneous string and add trailing new lines
* Use correct posts object in tests
* Revert accidental removal of where_types
* Add coupons category to RecommendedExtensions
* Use 1.1 api to get categorized recommendations
* Add missing text domains
* Fix menu handling to point to woocommerce-marketing
* Only load coupon scripts on the coupon page
* Rework marketing menu logic to register pages more properly
* Use correct wc-admin path for marketing page
* Remove separate feature flag
WC Admin has existing feature flags to load enable/disable the feature
* Only set the coupon parent to marketing when the feature is enabled
* Only load coupon feature if marketing feature is enabled
Co-authored-by: Dan Bitzer <danielbitzer@gmail.com>
Co-authored-by: Jeremy Pry <jeremy.pry@gmail.com>
* Product count rule
# Conflicts:
# src/RemoteInboxNotifications/GetRuleProcessor.php
# Conflicts:
# src/RemoteInboxNotifications/GetRuleProcessor.php
* Use WC class to get products instead of a custom query
* Remove ProductsProvider
* Use total in product query
* Updates to suit parent branch
* Fixed return value
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Fix comment and convert if..elseif to switch
* Take out intermediate function
* make ProductsProvider a non-static class
* Adds RINDS data rule, and set up for woocommerce/woocommerce-admin#4223
# Conflicts:
# src/RemoteInboxNotifications/EvaluateAndGetStatus.php
* Fix rebase issues
# Conflicts:
# src/RemoteInboxNotifications/DataRuleProcessor.php
* Split product data setup out, use product query
# Conflicts:
# src/RemoteInboxNotifications/RemoteInboxNotificationsEngine.php
* Remove RINDS references
* Remove unused products provider
* Add validation to the data rule processor
* Fix some issues that were failing tests
* Remove unused var
* Make data setup for products return the data object
* Rework product query
* Rename $data to $stored_state
* Fix condition in query
* Add time after wcadmin activation rule (https://github.com/woocommerce/woocommerce-admin/pull/4337)
* Add wcadmin active for rule
# Conflicts:
# src/RemoteInboxNotifications/GetRuleProcessor.php
* Use DAY_IN_SECONDS constant
* Fix logic error
* Fix test naming
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add order count rule (https://github.com/woocommerce/woocommerce-admin/pull/4335)
* Order count rule
# Conflicts:
# src/RemoteInboxNotifications/GetRuleProcessor.php
* Use default provider
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Use correct 'return' value
* Move back to using a SQL query to get the product count
as the WC_Product_Query has issues during the product publish lifecycle. The product is initially published with a taxonomy term of uncategorized which isn't accepted by the query's filter.
* Change back to using WC_Product_Query, and do prelim init via admin_init action
* If there are no specs when running the engine, run the poller first then retry
* Fix some failing tests
* Don't perform init if we're feature toggled off
* Move feature check inside RIN engine class because the feature filter isn't ready during FeaturePlugin init
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Bugfix: there was a problem with the method onChoose in onboarding
This commit fixes a problem with the method onChoose in the last onboarding step
* Small fix
This commit adds a small fix in the use of an element
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Dismiss dropdown styles fixed
This commit fixes the "Dismiss" dropdown styles
* Text color replaced in Dismiss dropdown
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Make it possible to add marketing submenu pages
* Always set the parent value for marketing pages
* phpcs
* Add ‘overview’ to breadcrumb and path
* Fix permission check conditional
* Add parent menu at priority of 9, before other items are usually added
* Revert to use `/marketing` as the page path
* Added new notification to choose a niche
This commit adds a new notification to choose a niche
# Conflicts:
# src/Events.php
* Bugfix: removed wrong validation
* Added validation for onboarding_profile
This commits adds a validation to confirm that the onboarding_profile is set.
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Show Stripe task for recently supported countries
* Add Puerto Rico as supported 'country', included in US by Stripe
* Add preview country India to Stripe supported list
* refactor slider component to be functional
* Refactor RecommendedExtensions
* Refactor KnowledgeBase
* Refactor API to account for component location changes and categories
* Fix missing param description
* Remove unnessary use
* Pass down the category of the received plugins.
* Store the recommended plugins for the different categories separately.
* Pass down the category.
* Add new functions to get by category.
* set categories
* Handle new object for posts and recommendations
* Update tests
* Finish off implementing category param for data store resolvers
* Update js tests
* Fix incorrect reference to kb component
Co-authored-by: Dan Bitzer <danielbitzer@gmail.com>
* Add installAndActivatePlugins method to plugin store
* Use new install/actiate method in Plugins component
* Refactor benefits page to use await
* Refactor business details page to use new install method
* Replace Plugins component in Jetpack CTA
* Format and throw errors in plugin data store
* Add generic response handling function
* Add default error messages to plugin API
* Add Learn more about Product Settings note
* Fix logic around new merchants vs existing, fix product count
* Refactor to use admin_init action, use WC_Product_Query
* Don't try to count products when recording added product date
* Rename function
* Completely drop recording product add times and just use oldest product date instead
* Remove onboarding update check, checking the profile is sufficient
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Initial user preferences custom hook (wc meta).
* Organize dependencies.
* Specify dependencies in useSelect() call.
* Remove specifying preference keys.
There's currently no performance benefit to be had.
* Add HoC for hydrating current user data.
* Add user prefs update method.
* Export user prefs hook and HoC in data package.
* Handle error condition when updating user preferences.
* Use closure to get user ID for prefs update.
* Refactor analytics dashboard to use new user hook.
* Refactor ReportTable component to use new user hook.
* Move prop access to top of function component.
* Add todo for potential manual resolution logic.
* Refactor DashboardCharts component to use new user preferences hook.
* Move code out of functional component where possible.
* Fix chart interval query property.
* Refactor Leaderboards component to use new user preferences hook.
* Move code out of functional component where possible.
* Refactor Inbox panel to use user prefs hook.
@todo - updating last read isn't working.
* Use user prefs hook in StatsOverview component.
* Export user preferences store name.
* Use new store for unread inbox indicator.
* Hydrate current user data higher up in the app.
* Update "last read" timestamp in inbox panel.
* Fix StatsOverview test.
* Remove unused dispatch method from StorePerformance component.
* Remove now defunct user methods from wc-api spec.
* Add tests for isRequesting.
* JSON decode WC meta on updated user object.
* Test user prefs retrieval and save.
* Remove todo comment.
* Use user prefs hook in Jetpack install CTA on homepage.
* Add custom autocompleter support to Search component
* Throw error if Search autocompleter is missing or is of the wrong type
* Add custom Search autocompleter changelog entry
* Changed some API responses
This commit adds changes to some API responses
* Changed "woocommerce_task_list_complete" loading in frontend
* Updated "$migrated_options" array
This commit updates "$migrated_options" array and adds a deletion control
* Changed "taskListComplete" in customizable.js
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Added refactor in "handleBlur" for IE compatibility
This commit adds a refactor in the method "handleBlur" for IE compatibility
* Modified styles for IE compatibility
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Added new notification to ask about starting a dropshipping business.
This commit adds a new notification to ask the client if they are considering starting a dropshipping business.
* Bugfix: corrected some problems in this note's logic
This commit adds a new validation for onboarding_profile, it removes an incorrect validation and changes the action's name
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Use plugins store rather than getSettings
* Show install Jetpack CTA if Jetpack is not connected
* Fix redirect URL
Co-authored-by: Rebecca Scott <me@becdetat.com>