Commit c6e670cc6b for woocommerce
commit c6e670cc6bc300c52de3a0af34e2df1c60e7fa7e
Author: Ahmed <ahmed.el.azzabi@automattic.com>
Date: Thu Apr 24 12:01:33 2025 +0100
WOOPLUG-3201: Add GrabPay to WooPayments supported payment methods (#57436)
* Add SVG icons for GrabPay and WeChat Pay payment methods
* Add GrabPay and WeChat Pay payment methods to WooPaymentsMethodsLogos component
* Add changefile(s) from automation for the following project(s): @woocommerce/onboarding
* Clean GrabPay SVG
* remove className from SVG path
* Revret the addition of WeChat Pay
* Add changefile(s) from automation for the following project(s): @woocommerce/onboarding, woocommerce
* Delete the correct wechat-pay file
* Update the total PMs count
* Add changefile(s) from automation for the following project(s): @woocommerce/onboarding
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
diff --git a/packages/js/onboarding/changelog/57436-add-wechat-grab b/packages/js/onboarding/changelog/57436-add-wechat-grab
new file mode 100644
index 0000000000..b672ae0e97
--- /dev/null
+++ b/packages/js/onboarding/changelog/57436-add-wechat-grab
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Update the list of supported payment methods in WooPayments to add GrabPay
\ No newline at end of file
diff --git a/packages/js/onboarding/src/components/WooPaymentsMethodsLogos/index.tsx b/packages/js/onboarding/src/components/WooPaymentsMethodsLogos/index.tsx
index 4a8e26c9c4..84e5062b56 100644
--- a/packages/js/onboarding/src/components/WooPaymentsMethodsLogos/index.tsx
+++ b/packages/js/onboarding/src/components/WooPaymentsMethodsLogos/index.tsx
@@ -29,6 +29,7 @@ import Bancontact from '../../images/payment-methods/bancontact';
import Eps from '../../images/payment-methods/eps';
import Becs from '../../images/payment-methods/becs';
import Przelewy24 from '../../images/payment-methods/przelewy24';
+import GrabPay from '../../images/payment-methods/grabpay';
/**
* Payment methods list.
@@ -114,6 +115,10 @@ const PaymentMethods = [
name: 'przelewy24',
component: <Przelewy24 key="przelewy24" />,
},
+ {
+ name: 'grabpay',
+ component: <GrabPay key="grabpay" />,
+ },
];
export const WooPaymentsMethodsLogos = ( {
@@ -147,7 +152,7 @@ export const WooPaymentsMethodsLogos = ( {
* The default is set according to https://woocommerce.com/document/woopayments/payment-methods.
* If not eligible for WooPay, the total number of payment methods is reduced by one.
*/
- totalPaymentMethods = 20,
+ totalPaymentMethods = 21,
}: {
isWooPayEligible: boolean;
maxElements: number;
diff --git a/packages/js/onboarding/src/images/payment-methods/grabpay.js b/packages/js/onboarding/src/images/payment-methods/grabpay.js
new file mode 100644
index 0000000000..c520ab51a2
--- /dev/null
+++ b/packages/js/onboarding/src/images/payment-methods/grabpay.js
@@ -0,0 +1,33 @@
+/**
+ * External dependencies
+ */
+import { createElement } from '@wordpress/element';
+
+export default () => (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ xmlSpace="preserve"
+ width="64"
+ x="0"
+ y="0"
+ version="1.1"
+ viewBox="0 0 34 21.2"
+ >
+ <path
+ fill="#00B14F"
+ d="M32.4 21.2H1.6c-.9 0-1.6-.7-1.6-1.6v-18C0 .7.7 0 1.6 0h30.8c.9 0 1.6.7 1.6 1.6v18c0 .9-.7 1.6-1.6 1.6z"
+ />
+ <g fill="#FFF">
+ <path d="M11.3 10.4v.3c0 1.8.7 3.4 1.9 4.6 1.2 1.2 2.8 1.9 4.5 1.9 1.4 0 2.6-.3 3.7-.9.9-.5 1.2-1 1.3-1.1V9.8h-5.2v1h4.2v4.1c-.5.5-1.6 1.3-3.9 1.3-1.5 0-2.8-.6-3.9-1.6-1-1-1.6-2.4-1.6-3.9v-.3c0-1.4.6-2.8 1.7-3.8C15.1 5.5 16.6 5 18.1 5c1.4 0 2.4.2 3.2.7V4.5c-.7-.3-1.7-.5-3.1-.5-3.7 0-6.9 2.9-6.9 6.4" />
+ <path d="M21.4 7.6V6.4c-.9-.5-1.9-.7-3.2-.7-1.3 0-2.6.5-3.6 1.4-1 .9-1.5 2.1-1.5 3.3v.3c0 2.6 2.1 4.7 4.7 4.7 2.1 0 2.9-.7 3.2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