Skip to content

Instantly share code, notes, and snippets.

@Jeff2Ma
Jeff2Ma / Support PayPal GateWay in woocommerce.php
Last active August 28, 2022 12:07
Support PayPal GateWay in woocommerce【让woocommerce中文网关支持paypal并自动转换人民币美元转换】
<?php
//woocommerce中文网关支持paypal
// details at http://devework.com/support-paypal-gateway-in-woocommerce.html
//本函数解决的问题:贝宝不支持你的商铺货币。Gateway Disabled: PayPal does not support your store's currency.
add_filter( 'woocommerce_paypal_supported_currencies', 'enable_custom_currency' );
function enable_custom_currency($currency_array) {
$currency_array[] = 'CNY';
return $currency_array;
}