diff --git a/plugins/woocommerce-admin/changelogs/update-7719 b/plugins/woocommerce-admin/changelogs/update-7719 new file mode 100644 index 00000000000..1eb23ad6d94 --- /dev/null +++ b/plugins/woocommerce-admin/changelogs/update-7719 @@ -0,0 +1,4 @@ +Significance: patch +Type: Update + +Update WC Pay card to include in-person information #7830 diff --git a/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/components/Action.js b/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/components/Action.js index a808542a679..9b94d63b1d8 100644 --- a/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/components/Action.js +++ b/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/components/Action.js @@ -107,18 +107,16 @@ export const Action = ( { if ( isInstalled && hasPlugins ) { return ( -
- -
+ ); } diff --git a/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/index.js b/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/index.js index 85135ec27cf..012cf8d3c8b 100644 --- a/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/index.js +++ b/plugins/woocommerce-admin/client/tasks/fills/PaymentGatewaySuggestions/index.js @@ -169,7 +169,8 @@ export const PaymentGatewaySuggestions = ( { onComplete, query } ) => { // WCPay is handled separately when not installed and configured if ( - gateway.id === 'woocommerce_payments' && + gateway.plugins?.length === 1 && + gateway.plugins[ 0 ] === 'woocommerce-payments' && ! ( gateway.installed && ! gateway.needsSetup ) ) { wcPay.push( gateway ); diff --git a/plugins/woocommerce-admin/src/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php b/plugins/woocommerce-admin/src/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php index 4d1949f3e48..a7c3984f6ba 100644 --- a/plugins/woocommerce-admin/src/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php +++ b/plugins/woocommerce-admin/src/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php @@ -217,10 +217,90 @@ class DefaultPaymentGateways { ), 'image' => plugins_url( 'images/onboarding/wcpay.svg', WC_ADMIN_PLUGIN_FILE ), 'plugins' => array( 'woocommerce-payments' ), - 'description' => 'Try the new way to get paid. Securely accept credit and debit cards on your site. Manage transactions without leaving your WordPress dashboard. Only with WooCommerce Payments.', + 'description' => 'With WooCommerce Payments, you can securely accept major cards, Apple Pay, and payments in over 100 currencies. Track cash flow and manage recurring revenue directly from your store’s dashboard - with no setup costs or monthly fees.', 'is_visible' => array( self::get_rules_for_cbd( false ), self::get_rules_for_countries( self::get_wcpay_countries() ), + (object) array( + 'type' => 'plugin_version', + 'plugin' => 'woocommerce-admin', + 'version' => '2.9.0-dev', + 'operator' => '<', + ), + (object) array( + 'type' => 'plugin_version', + 'plugin' => 'woocommerce', + 'version' => '5.10.0-dev', + 'operator' => '<', + ), + ), + 'recommendation_priority' => 1, + ), + array( + 'id' => 'woocommerce_payments:non-us', + 'title' => __( 'WooCommerce Payments', 'woocommerce-admin' ), + 'content' => __( + 'Manage transactions without leaving your WordPress Dashboard. Only with WooCommerce Payments.', + 'woocommerce-admin' + ), + 'image' => plugins_url( 'images/onboarding/wcpay.svg', WC_ADMIN_PLUGIN_FILE ), + 'plugins' => array( 'woocommerce-payments' ), + 'description' => 'With WooCommerce Payments, you can securely accept major cards, Apple Pay, and payments in over 100 currencies. Track cash flow and manage recurring revenue directly from your store’s dashboard - with no setup costs or monthly fees.', + 'is_visible' => array( + self::get_rules_for_cbd( false ), + self::get_rules_for_countries( array_diff( self::get_wcpay_countries(), array( 'US' ) ) ), + (object) array( + 'type' => 'or', + // Older versions of WooCommerce Admin require the ID to be `woocommerce-payments` to show the suggestion card. + 'operands' => (object) array( + (object) array( + 'type' => 'plugin_version', + 'plugin' => 'woocommerce-admin', + 'version' => '2.9.0-dev', + 'operator' => '>=', + ), + (object) array( + 'type' => 'plugin_version', + 'plugin' => 'woocommerce', + 'version' => '5.10.0-dev', + 'operator' => '>=', + ), + ), + ), + ), + 'recommendation_priority' => 1, + ), + array( + 'id' => 'woocommerce_payments:us', + 'title' => __( 'WooCommerce Payments', 'woocommerce-admin' ), + 'content' => __( + 'Manage transactions without leaving your WordPress Dashboard. Only with WooCommerce Payments.', + 'woocommerce-admin' + ), + 'image' => plugins_url( 'images/onboarding/wcpay.svg', WC_ADMIN_PLUGIN_FILE ), + 'plugins' => array( 'woocommerce-payments' ), + 'description' => 'With WooCommerce Payments, you can securely accept major cards, Apple Pay, and payments in over 100 currencies – with no setup costs or monthly fees – and you can now accept in-person payments with the Woo mobile app.', + 'is_visible' => array( + self::get_rules_for_cbd( false ), + self::get_rules_for_countries( array( 'US' ) ), + (object) array( + 'type' => 'or', + // Older versions of WooCommerce Admin require the ID to be `woocommerce-payments` to show the suggestion card. + 'operands' => (object) array( + (object) array( + 'type' => 'plugin_version', + 'plugin' => 'woocommerce-admin', + 'version' => '2.9.0-dev', + 'operator' => '>=', + ), + (object) array( + 'type' => 'plugin_version', + 'plugin' => 'woocommerce', + 'version' => '5.10.0-dev', + 'operator' => '>=', + ), + ), + ), ), 'recommendation_priority' => 1, ),