返信先: 領収書などのラベル表記の変更について

フォーラム その他 領収書などのラベル表記の変更について 返信先: 領収書などのラベル表記の変更について

#72170
fieldworks
参加者

welcartを利用している方のブログを参考にfunction.phpに下記を追加することでweb上の表記を変更することはできました。

/***********************************************************
* 「キャンペーン割引」を「会員優待割引」に書き換え
***********************************************************/
add_filter(‘usces_confirm_discount_label’, ‘special_member_confirm_discount_label’, 10, 1);
function special_member_confirm_discount_label(){
global $usces;
$entry = $usces->cart->get_entry();
$total_items_price = $usces->get_total_price();
$member_status = array( ‘優良会員’, ‘VIP会員’);
if( usces_is_login() && in_array(usces_the_member_status(‘return’), $member_status) ){
$text = “会員優待割引”;
} else {
$text = __(‘Campaign disnount’, ‘usces’);
}
return $text;
}

これを元に「usces_filter_disnount_label」で書き換えれば良いのかと思ったのですが、そういうことではなさそうで・・・。
phpのプログラミングは初心者も同然なので、具体的にアドバイスいただけると助かります。
ちなみに、書き換えた内容は次のとおりです。

/***********************************************************
* 領収書等「キャンペーン割引」を「会員優待割引」に書き換え
***********************************************************/
add_filter(‘usces_filter_discount_label’, ‘special_member_discount_label’, 10, 1);
function special_member_discount_label(){
global $usces;
$entry = $usces->cart->get_entry();
$total_items_price = $usces->get_total_price();
$member_status = array( ‘優良会員’, ‘VIP会員’);
if( usces_is_login() && in_array(usces_the_member_status(‘return’), $member_status) ){
$text = “会員優待割引”;
} else {
$text = __(‘Campaign disnount’, ‘usces’);
}
return $text;
}