将以下函数添加到我的functions.php文件中导致白屏死机。当我删除此功能时,该网站显示正常:
add_filter( 'woocommerce_currencies', 'add_my_currency' );
function add_my_currency( $currencies ) {
$currencies['KES'] = __( 'Kenyan Shillings', 'woocommerce' );
return $currencies;
}
add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2);
function add_my_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'KES': $currency_symbol = 'KSH'; break;
}
return $currency_symbol;
}
答案 0 :(得分:0)
我发现罪魁祸首是一个插件。停用它,解决了问题。