返信先: 内容確認ページのカスタマイズについて

ホーム フォーラム 使い方全般 内容確認ページのカスタマイズについて 返信先: 内容確認ページのカスタマイズについて

#87755

taronuts
参加者

以下のコードをfunction.phpに追記でいくつかの項目を表示しないように出来ました。
しかし、「国」が表示されません。
どこを修正すれば「国」を表示出来るようになるでしょうか?
よろしくお願いいたします。

=======================

add_filter(‘usces_filter_apply_addressform_confirm’, ‘my_usces_filter_apply_addressform_confirm’, 10, 3);
function my_usces_filter_apply_addressform_confirm($formtag, $type, $data) {
global $usces;
switch( $type ) {
case ‘confirm’:
case ‘member’:
$values = $data;
break;
case ‘customer’:
case ‘delivery’:
$values = $data[$type];
break;
}

$values = $usces->stripslashes_deep_post($values);
$formtag = ”;
$formtag .= usces_custom_field_info($data, ‘customer’, ‘name_pre’, ‘return’);
$formtag .= ‘<tr class=”name-row member-name-row”><th>’.apply_filters( ‘usces_filters_addressform_name_label’, __(‘Full name’, ‘usces’), $type, $values, $applyform ).'</th><td>’ . esc_html(sprintf(_x(‘%s’, ‘honorific’, ‘usces’), (esc_html($values[‘customer’][‘name1’]) . ‘ ‘ . esc_html($values[‘customer’][‘name2’])) )) . ‘</td></tr>’;
$furigana = ( ” == (trim($values[‘customer’][‘name3’]) . trim($values[‘customer’][‘name4’])) ) ? ” : sprintf(_x(‘%s’, ‘honorific’, ‘usces’), (esc_html($values[‘customer’][‘name3’]) . ‘ ‘ . esc_html($values[‘customer’][‘name4’])) );
$furigana_customer = ‘<tr class=”furikana-row member-furikana-row”><th>’.__(‘furigana’, ‘usces’).'</th><td>’ . $furigana . ‘</td></tr>’;
$formtag .= apply_filters( ‘usces_filter_furigana_confirm_customer’, $furigana_customer, $type, $values );
$formtag .= usces_custom_field_info($data, ‘customer’, ‘name_after’, ‘return’);
if( 1 < $target_market_count ){
$customer_country = (!empty($usces_settings[‘country’][$values[‘customer’][‘country’]])) ? $usces_settings[‘country’][$values[‘customer’][‘country’]] : ”;
$formtag .= ‘<tr class=”country-row member-country-row”><th>’.__(‘Country’, ‘usces’).'</th><td>’ . esc_html($customer_country) . ‘</td></tr>’;
}
$customer_pref = ( $values[‘customer’][‘pref’] == __(‘– Select –‘,’usces’) || $values[‘customer’][‘pref’] == ‘– Select –‘ ) ? ” : $values[‘customer’][‘pref’];
$formtag .= ‘
<tr class=”states-row member-states-row”><th>’.__(‘Province’, ‘usces’).'</th><td>’ . esc_html($customer_pref) . ‘</td></tr>’;
$formtag .= ‘<tr class=”zipcode-row member-zipcode-row”><th>’.__(‘Zip/Postal Code’, ‘usces’).'</th><td>’ . esc_html($values[‘customer’][‘zipcode’]) . ‘</td></tr>’;
$formtag .= ‘
<tr class=”address1-row member-address1-row”><th>’.__(‘city’, ‘usces’).'</th><td>’ . esc_html($values[‘customer’][‘address1’]) . ‘</td></tr>
<tr class=”tel-row member-tel-row”><th>’.__(‘Phone number’, ‘usces’).'</th><td>’ . esc_html($values[‘customer’][‘tel’]) . ‘</td></tr>’;
$formtag .= usces_custom_field_info($data, ‘customer’, ‘fax_after’, ‘return’);

$shipping_address_info = ”;
if( isset($values[‘delivery’]) ) {
$shipping_address_info = ‘<tr class=”ttl”><td colspan=”2″><h3>’.__(‘Shipping address information’, ‘usces’).'</h3></td></tr>’;
$shipping_address_info .= usces_custom_field_info($data, ‘delivery’, ‘name_pre’, ‘return’);
$shipping_address_info .= ‘<tr class=”name-row delivery-name-row”><th>’.apply_filters( ‘usces_filters_addressform_name_label’, __(‘Full name’, ‘usces’), $type, $values, $applyform ).'</th><td>’ . sprintf(_x(‘%s’, ‘honorific’, ‘usces’), (esc_html($values[‘delivery’][‘name1’]) . ‘ ‘ . esc_html($values[‘delivery’][‘name2’])) ) . ‘</td></tr>’;
$deli_furigana = ( ” == (trim($values[‘delivery’][‘name3’]) . trim($values[‘delivery’][‘name4’])) ) ? ” : sprintf(_x(‘%s’, ‘honorific’, ‘usces’), (esc_html($values[‘delivery’][‘name3’]) . ‘ ‘ . esc_html($values[‘delivery’][‘name4’])) );
$furigana_delivery = ‘<tr class=”furikana-row delivery-furikana-row”><th>’.__(‘furigana’, ‘usces’).'</th><td>’ . $deli_furigana . ‘</td></tr>’;
$shipping_address_info .= apply_filters( ‘usces_filter_furigana_confirm_delivery’, $furigana_delivery, $type, $values );
$shipping_address_info .= usces_custom_field_info($values, ‘delivery’, ‘name_after’, ‘return’);
if( 1 < $target_market_count ){
$shipping_country = (!empty($usces_settings[‘country’][$values[‘delivery’][‘country’]])) ? $usces_settings[‘country’][$values[‘delivery’][‘country’]] : ”;
$shipping_address_info .= ‘<tr class=”country-row delivery-country-row”><th>’.__(‘Country’, ‘usces’).'</th><td>’ . esc_html($shipping_country) . ‘</td></tr>’;
}
$delivery_pref = ( $values[‘delivery’][‘pref’] == __(‘– Select –‘,’usces’) || $values[‘delivery’][‘pref’] == ‘– Select –‘ ) ? ” : $values[‘delivery’][‘pref’];
$shipping_address_info .= ‘
<tr class=”states-row delivery-states-row”><th>’.__(‘Province’, ‘usces’).'</th><td>’ . esc_html($delivery_pref) . ‘</td></tr>’;
$shipping_address_info .= ‘<tr class=”zipcode-row delivery-zipcode-row”><th>’.__(‘Zip/Postal Code’, ‘usces’).'</th><td>’ . esc_html($values[‘delivery’][‘zipcode’]) . ‘</td></tr>’;
$shipping_address_info .= ‘
<tr class=”address1-row delivery-address1-row”><th>’.__(‘city’, ‘usces’).'</th><td>’ . esc_html($values[‘delivery’][‘address1’]) . ‘</td></tr>
<tr class=”tel-row delivery-tel-row”><th>’.__(‘Phone number’, ‘usces’).'</th><td>’ . esc_html($values[‘delivery’][‘tel’]) . ‘</td></tr>’;
$shipping_address_info .= usces_custom_field_info($data, ‘delivery’, ‘fax_after’, ‘return’);
}
$formtag .= apply_filters(‘usces_filter_shipping_address_info’, $shipping_address_info);
return $formtag;
}