到目前为止,我已经尝试将以下代码添加到我的functions.php中,但没有运气:
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Sign-up Fee' :
$translated_text = __( 'bin deposit', 'woocommerce-subscriptions' );
break;
case 'Apply Coupon':
$translated_text = __( 'Enter Coupon', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'my_text_strings', 20, 3 );
?>
function my_signupfee_string( $pricestring ) {
$newprice = str_replace( 'sign-up fee', 'bin deposit', $pricestring );
return $newprice;
}
add_filter( 'woocommerce_subscriptions_sign_up_fee', 'my_signupfee_string' );
?>
这些功能都不起作用,我是新手更改插件的内部插件.