更改 WooCommerce Stripe Gateway 描述文本
Change WooCommerce Stripe Gateway description text
我有一个网站使用 WooCommerce 和 WooCommerce Stripe Gateway 插件通过 Stripe 处理支付。
目前,当在结帐阶段选择 Stripe 时,会显示一条消息 "Pay with your credit card via Stripe",是否可以更改此消息?我基本上想让它说 "Pay with your debit or credit card via Stripe" 所以很明显,这不仅仅是信用卡付款。
我想出的最好方法是在 /checkout/payment-method.php
文件中添加一个 if 语句,该文件将为除 Stripe 之外的所有付款方式输出 $gateway->payment_fields();
并硬编码 Stripe 的输出.
有没有办法只改变 $gateway->payment_fields();
的输出呢?因为那将是一种 'cleaner' 的方式。我试过将 $gateway->payment_fields();
存储到一个变量然后使用 str_replace()
输出它,但它似乎 $gateway->payment_fields();
只是回显它的内容而不是 returns 它。
这是一个管理员设置。 WooCommerce>设置>结帐>条纹
我有一个网站使用 WooCommerce 和 WooCommerce Stripe Gateway 插件通过 Stripe 处理支付。
目前,当在结帐阶段选择 Stripe 时,会显示一条消息 "Pay with your credit card via Stripe",是否可以更改此消息?我基本上想让它说 "Pay with your debit or credit card via Stripe" 所以很明显,这不仅仅是信用卡付款。
我想出的最好方法是在 /checkout/payment-method.php
文件中添加一个 if 语句,该文件将为除 Stripe 之外的所有付款方式输出 $gateway->payment_fields();
并硬编码 Stripe 的输出.
有没有办法只改变 $gateway->payment_fields();
的输出呢?因为那将是一种 'cleaner' 的方式。我试过将 $gateway->payment_fields();
存储到一个变量然后使用 str_replace()
输出它,但它似乎 $gateway->payment_fields();
只是回显它的内容而不是 returns 它。
这是一个管理员设置。 WooCommerce>设置>结帐>条纹