woocommerce/plugins/woocommerce-admin/client/payments-welcome/exit-survey-modal.tsx

168 lines
4.4 KiB
TypeScript
Raw Normal View History

Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
/**
* External dependencies
*/
import { useState } from '@wordpress/element';
import {
Button,
Modal,
CheckboxControl,
TextareaControl,
} from '@wordpress/components';
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
import { useDispatch, useSelect } from '@wordpress/data';
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
import { recordEvent } from '@woocommerce/tracks';
/**
* Internal dependencies
*/
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
import { getAdminSetting } from '~/utils/admin-settings';
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
import strings from './strings';
/**
* Provides a modal requesting customer feedback.
*
*/
function ExitSurveyModal( {}: {
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
// eslint-disable-next-line @typescript-eslint/ban-types
setExitSurveyModalOpen: Function;
} ): JSX.Element | null {
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
const incentive = getAdminSetting( 'wcpayWelcomePageIncentive' );
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
const [ isOpen, setOpen ] = useState( true );
const [ isHappyChecked, setHappyChecked ] = useState( false );
const [ isInstallChecked, setInstallChecked ] = useState( false );
const [ isMoreInfoChecked, setMoreInfoChecked ] = useState( false );
const [ isAnotherTimeChecked, setAnotherTimeChecked ] = useState( false );
const [ isSomethingElseChecked, setSomethingElseChecked ] =
useState( false );
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
const [ comments, setComments ] = useState( '' );
const { updateOptions } = useDispatch( OPTIONS_STORE_NAME );
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
const dismissedIncentives = useSelect( ( select ) => {
const { getOption } = select( OPTIONS_STORE_NAME );
return (
( getOption(
'wcpay_welcome_page_incentives_dismissed'
) as string[] ) || []
);
} );
const closeModal = async () => {
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
setOpen( false );
// Record that the modal was dismissed.
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
await updateOptions( {
wcpay_welcome_page_incentives_dismissed: [
...dismissedIncentives,
incentive.id,
],
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
} );
// Redirect back to the admin page.
window.location.href = 'admin.php?page=wc-admin';
};
const exitSurvey = () => {
recordEvent( 'wcpay_exit_survey', {
just_remove: true /* eslint-disable-line camelcase */,
} );
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
closeModal();
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
};
const sendFeedback = () => {
recordEvent( 'wcpay_exit_survey', {
/* eslint-disable camelcase */
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
happy: isHappyChecked ? 'Yes' : 'No',
install: isInstallChecked ? 'Yes' : 'No',
more_info: isMoreInfoChecked ? 'Yes' : 'No',
another_time: isAnotherTimeChecked ? 'Yes' : 'No',
something_else: isSomethingElseChecked ? 'Yes' : 'No',
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
comments,
/* eslint-enable camelcase */
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
} );
if ( isMoreInfoChecked ) {
// Record that the user would possibly consider installing WCPay with more information in the future.
updateOptions( {
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
wcpay_welcome_page_exit_survey_more_info_needed_timestamp:
Math.floor( Date.now() / 1000 ),
} );
}
closeModal();
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
};
if ( ! isOpen ) {
return null;
}
return (
<Modal
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
className="woopayments-welcome-page__survey"
title={ strings.survey.title }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
onRequestClose={ closeModal }
shouldCloseOnClickOutside={ false }
>
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
<p className="woopayments-welcome-page__survey-intro">
{ strings.survey.intro }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
</p>
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
<p className="woopayments-welcome-page__survey-question">
{ strings.survey.question }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
</p>
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
<div className="woopayments-welcome-page__survey-selection">
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
<CheckboxControl
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
label={ strings.survey.happyLabel }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
checked={ isHappyChecked }
onChange={ setHappyChecked }
/>
<CheckboxControl
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
label={ strings.survey.installLabel }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
checked={ isInstallChecked }
onChange={ setInstallChecked }
/>
<CheckboxControl
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
label={ strings.survey.moreInfoLabel }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
checked={ isMoreInfoChecked }
onChange={ setMoreInfoChecked }
/>
<CheckboxControl
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
label={ strings.survey.anotherTimeLabel }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
checked={ isAnotherTimeChecked }
onChange={ setAnotherTimeChecked }
/>
<CheckboxControl
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
label={ strings.survey.somethingElseLabel }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
checked={ isSomethingElseChecked }
onChange={ setSomethingElseChecked }
/>
</div>
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
<div className="woopayments-welcome-page__survey-comments">
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
<TextareaControl
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
label={ strings.survey.commentsLabel }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
value={ comments }
onChange={ ( value: string ) => setComments( value ) }
rows={ 3 }
/>
</div>
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
<div className="woopayments-welcome-page__survey-buttons">
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
<Button
isTertiary
isDestructive
onClick={ exitSurvey }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
name="cancel"
>
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
{ strings.survey.cancelButton }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
</Button>
<Button isSecondary onClick={ sendFeedback } name="send">
Update WCPay welcome page incentives (#38689) * Initial refactor of components Move out from index every UI component to make it easier to maintain. * Initial implementation of new design Some minor adjustments are missing, and I've added a few TODOs to complete later. * Add changelog entry * Finish design update * Compress menu icon * Add user's first name to heading copy * Fetch and cache eligible incentive from WCPay API Sharing its properties under `window.WcSettings.admin` * Filter `allowed_promo_notes` To be able to add those form WCPay API request * Update JS side to use the new shared incentive details * Ensure we cache requests even if there are no eligible incentives * Fix a typo in WCPayBanner * Move incentive preloaded data from wcSettings to a new window variable which will be only loaded on WCPay welcome page. * Simplify `has_wcpay` check * Render sanitized HTML from incentive description * Update get incentive logic to also cache non success responses * Add incentive ID to page view track * Add changelog entry for the onboarding package * Update used options names and add them to `get_default_option_permissions * Differentiate every dismissed incentive Reuse WCPay welcome page logic for notes display conditions * Use tos_url instead of tos_link to match response * Fix incentives endpoint request payload * Back to preload incentive on admin shared settings * Move promo notes filter to where it's used to avoid any possible race conditions. * Replace every occurrence of `WooCommerce Payments` with `WooPayments` * Prevent modal large padding-bottom * Prevent another global style override on modal * Fix TS error coming from trunk merge * Fix wrong style property * Further restrict WCPay incentives to plugin not active and countries supported * Adjust the meaning of has_wcpay * Wait for dismiss option update before redirect to prevent the side menu entry to be visible after redirecting back to WC admin. * Enforce TOS asterix at the end of incentive description * Remove underscore from priavate instance var. * Fix ESLint error * Fix SCSS linting issues * Refine `has_wcpay` and `has_orders` * Enforce consistent WooPayments branding * Enforce stricter i18n calls with escape * Update page title to match new branding * docs: Enforce branding in code docs also * Remove method that is unreliable to be used outside of onboarding * Remove unused constant * Missing new line Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> --------- Co-authored-by: Vlad Olaru <vlad@pixelgrade.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 14:32:58 +00:00
{ strings.survey.submitButton }
Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8151) * Move WC Pay welcome page from wc-calypso-bridge (https://github.com/woocommerce/woocommerce-admin/pull/8083) * Add wc-pay-welcome-screen flags * Add wc pay welcome page from wc calpyso bridge * Add changelog * Rename var to pageViewTimestamp to prevent confusion * Remove unused code * Make sure hasViewedWelcomePage is a boolean value * Simplify storeViewWelcome * Add payments remind me later note (https://github.com/woocommerce/woocommerce-admin/pull/8085) * Add payments remind me later note Fix wcpay path * Add changelogs * Update src/Notes/PaymentsRemindMeLater.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Fix possibly_add_note syntax error Update Events.php Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> * Replace flag icon with component and svg background to png (https://github.com/woocommerce/woocommerce-admin/pull/8101) * Activate promo note after WC Pay is activated (https://github.com/woocommerce/woocommerce-admin/pull/8104) * Activate promo after wcpay is a\ctivated * Add changelogs * Add experimental to promo API path and limit the promo names * Use ExPlat to render the WC Pay menu conditionally (https://github.com/woocommerce/woocommerce-admin/pull/8115) * Check ExPlat to render the menu conditionally * Update the experiment name * Fix letter case to follow feature class naming convention * Enable wc-pay-welcome-page feature in core config (https://github.com/woocommerce/woocommerce-admin/pull/8124) * Use wc_calypso_bridge_payments_dismissed option name to respect the previously saved setting from wp.com * Missed wc_calypso_bridge_payments_dismissed rename * Use the existing code to prevent duplication * Fix warning (https://github.com/woocommerce/woocommerce-admin/pull/8141) * Change experiment to come after checks (https://github.com/woocommerce/woocommerce-admin/pull/8142) * Change track path to (https://github.com/woocommerce/woocommerce-admin/pull/8143) Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com> Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * Replace deprecated wc-admin-settings package Co-authored-by: Moon <moon.kyong@automattic.com> Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-01-12 06:46:33 +00:00
</Button>
</div>
</Modal>
);
}
export default ExitSurveyModal;