如何解决“网关已禁用:PayPal 标准不支持您的商店货币。”在 WordPress 上运行的 WooCommerce 中?

发布于 2025-01-20 11:07:32 字数 813 浏览 1 评论 0原文

我正在使用 WordPress 和 Woocommerce 插件开发一个网站,我想使用 PayPal 作为支付网关,但每次我尝试设置 PayPal 时都会收到消息“网关已禁用:PayPal 标准不支持您的商店货币”。我位于肯尼亚,货币为(肯尼亚先令),PayPal 不支持该货币。我读过很多文章,解释如何通过在主题的 functions.php 上添加一些代码来解决此问题(甚至解释了此处有此错误)。

我不想使用子主题,有没有地方可以直接修改 WooCommerce 插件中的代码?在我的 functions.php 文件上使用以下代码不起作用。

add_filter( ‘woocommerce_paypal_supported_currencies’, ‘add_paypal_valid_currency’ );
function add_paypal_valid_currency( $currencies ) {
array_push ( $currencies , ‘Ksh’ ); /* YOUR CURRENCY */
return $currencies;
}

输入图片此处描述

I'm working on a website using WordPress and Woocommerce Plugin, I would like to use PayPal as a Payment gateway but I get the message "Gateway disabled: PayPal Standard does not support your store currency" every time I try to set up PayPal. I am based in Kenya and the currency is (Kenyan shilling) which is not supported by PayPal. I have read many articles explaining how to solve this by adding some code on functions.php of my theme (even what is explained here).

I don't want to use a child theme, is there a place I can directly modify the code in WooCommerce plugin? Using the below code on my functions.php file did not work.

add_filter( ‘woocommerce_paypal_supported_currencies’, ‘add_paypal_valid_currency’ );
function add_paypal_valid_currency( $currencies ) {
array_push ( $currencies , ‘Ksh’ ); /* YOUR CURRENCY */
return $currencies;
}

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

才能让你更想念 2025-01-27 11:07:32

为了使用 PayPal,交易必须以 PayPal 支持的货币计价,例如美元或欧元。

因此,更改您的商店以使用此类货币。即使您使用的是不受支持的货币,修改代码以强制启用 PayPal Standard 也只会导致结帐错误,因为 PayPal 将拒绝以 KSH 计价的交易。

使用受支持的货币时,如果付款人有其他本地货币(例如 KSH)的资金来源,则兑换结果将在 PayPal 结帐中向他们显示。

In order to use PayPal, transactions must be denominated in a supported PayPal currency, such as USD or EUR.

So, change your store store to use such a currency. Modifying the code to forcibly enable PayPal Standard even though you're using an unsupported currency will just result in checkout errors, as PayPal will reject transactions denominated in KSH.

When using a supported currency, if the payer has a funding source in some other local currency (such as KSH), the conversion will be shown to them in the PayPal checkout.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文