Skip to content

Commit 9691b28

Browse files
JinksiNagesh Pai
andauthored
Launch the merchant feedback prompt to all eligible merchants (#10529)
Co-authored-by: Nagesh Pai <nagesh.pai@automattic.com>
1 parent f09cc1e commit 9691b28

File tree

5 files changed

+11
-52
lines changed

5 files changed

+11
-52
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: add
3+
4+
Add a prompt to encourage merchants to provide feedback or leave a WordPress.org review for WooPayments

client/globals.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ declare global {
2020
paymentTimeline: boolean;
2121
isDisputeIssuerEvidenceEnabled: boolean;
2222
isPaymentOverviewWidgetEnabled?: boolean;
23-
/**
24-
* The development feature flag for the merchant feedback prompt. See issue #10323.
25-
*/
26-
isMerchantFeedbackPromptDevFlagEnabled: boolean;
2723
multiCurrency?: boolean;
2824
};
2925
accountFees: Record< string, any >;

client/merchant-feedback-prompt/hooks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export const useMerchantFeedbackPromptState = () => {
2323
} = useUserPreferences() as UserPreferences;
2424

2525
const isAccountEligible =
26-
wcpaySettings?.featureFlags?.isMerchantFeedbackPromptDevFlagEnabled &&
2726
wcpaySettings?.accountStatus?.campaigns?.wporgReview2025;
2827

2928
const hasUserDismissedPrompt =

client/merchant-feedback-prompt/test/index.test.tsx

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ jest.mock( '@woocommerce/data', () => {
6363
// Mock the wcpaySettings object
6464
declare const global: {
6565
wcpaySettings: {
66-
featureFlags: {
67-
isMerchantFeedbackPromptDevFlagEnabled: boolean;
68-
};
6966
accountStatus: {
7067
campaigns: {
7168
wporgReview2025: boolean;
@@ -94,9 +91,6 @@ describe( 'MerchantFeedbackPrompt', () => {
9491

9592
// Mock the dev feature flag to be enabled
9693
global.wcpaySettings = {
97-
featureFlags: {
98-
isMerchantFeedbackPromptDevFlagEnabled: true,
99-
},
10094
accountStatus: {
10195
campaigns: {
10296
wporgReview2025: true,
@@ -115,31 +109,8 @@ describe( 'MerchantFeedbackPrompt', () => {
115109
document.body.removeChild( portalRoot );
116110
} );
117111

118-
it( 'does not render when the dev feature flag is disabled', () => {
119-
global.wcpaySettings = {
120-
featureFlags: {
121-
isMerchantFeedbackPromptDevFlagEnabled: false,
122-
},
123-
accountStatus: {
124-
campaigns: {
125-
wporgReview2025: true,
126-
},
127-
},
128-
};
129-
130-
render( <MaybeShowMerchantFeedbackPrompt /> );
131-
132-
// The prompt should not be rendered
133-
expect(
134-
screen.queryByText( 'Are you satisfied with WooPayments?' )
135-
).not.toBeInTheDocument();
136-
} );
137-
138112
it( 'does not render when the account is not eligible for the campaign', () => {
139113
global.wcpaySettings = {
140-
featureFlags: {
141-
isMerchantFeedbackPromptDevFlagEnabled: true,
142-
},
143114
accountStatus: {
144115
campaigns: {
145116
wporgReview2025: false,

includes/class-wc-payments-features.php

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class WC_Payments_Features {
3131
const TOKENIZED_CART_ECE_FLAG_NAME = '_wcpay_feature_tokenized_cart_ece';
3232
const PAYMENT_OVERVIEW_WIDGET_FLAG_NAME = '_wcpay_feature_payment_overview_widget';
3333
const WOOPAY_GLOBAL_THEME_SUPPORT_FLAG_NAME = '_wcpay_feature_woopay_global_theme_support';
34-
const PROMPT_MERCHANT_FOR_REVIEW_FLAG_NAME = '_wcpay_feature_prompt_merchant_for_review';
3534

3635
/**
3736
* Indicates whether card payments are enabled for this (Stripe) account.
@@ -372,14 +371,13 @@ public static function is_next_deposit_notice_dismissed(): bool {
372371
public static function to_array() {
373372
return array_filter(
374373
[
375-
'multiCurrency' => self::is_customer_multi_currency_enabled(),
376-
'woopay' => self::is_woopay_eligible(),
377-
'documents' => self::is_documents_section_enabled(),
378-
'woopayExpressCheckout' => self::is_woopay_express_checkout_enabled(),
379-
'isAuthAndCaptureEnabled' => self::is_auth_and_capture_enabled(),
380-
'isDisputeIssuerEvidenceEnabled' => self::is_dispute_issuer_evidence_enabled(),
381-
'isPaymentOverviewWidgetEnabled' => self::is_payment_overview_widget_ui_enabled(),
382-
'isMerchantFeedbackPromptDevFlagEnabled' => self::is_merchant_feedback_prompt_dev_flag_enabled(),
374+
'multiCurrency' => self::is_customer_multi_currency_enabled(),
375+
'woopay' => self::is_woopay_eligible(),
376+
'documents' => self::is_documents_section_enabled(),
377+
'woopayExpressCheckout' => self::is_woopay_express_checkout_enabled(),
378+
'isAuthAndCaptureEnabled' => self::is_auth_and_capture_enabled(),
379+
'isDisputeIssuerEvidenceEnabled' => self::is_dispute_issuer_evidence_enabled(),
380+
'isPaymentOverviewWidgetEnabled' => self::is_payment_overview_widget_ui_enabled(),
383381
]
384382
);
385383
}
@@ -395,13 +393,4 @@ private static function is_woopayments_gateway_enabled() {
395393

396394
return 'yes' === $woopayments_enabled_setting;
397395
}
398-
399-
/**
400-
* This is a temporary development flag for the merchant feedback prompt (see issue #10323) that will be removed once the feature is ready for production.
401-
*
402-
* @return bool
403-
*/
404-
public static function is_merchant_feedback_prompt_dev_flag_enabled(): bool {
405-
return '1' === get_option( self::PROMPT_MERCHANT_FOR_REVIEW_FLAG_NAME, '0' );
406-
}
407396
}

0 commit comments

Comments
 (0)