Last active
February 15, 2021 06:46
-
-
Save mono96/094a1f52869d55a05e4be0cac6b56d05 to your computer and use it in GitHub Desktop.
追跡会社カスタマイズ for Japanized for WooCommerce Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 追跡会社カスタマイズ for Japanized for WooCommerce Pro */ | |
function my_carrier_tracking_data(){ | |
$my_carrier_tracking_url_data = array( | |
'seino' => array( | |
'title' => __( '西濃運輸', 'jp4wc-pro' ), | |
'url' => 'https://track.seino.co.jp/kamotsu/GempyoNoShokai.do', | |
), | |
); | |
return $my_carrier_tracking_url_data; | |
} | |
add_filter( 'jp4wc_tracking_url', 'my_carrier_tracking_data'); | |
function my_carrier_tracking_fields(){ | |
$tracking_fields = array( | |
'jp4wc-delivery-company' => array( | |
'type' => 'select', | |
'id' => 'jp4wc_delivery_company', | |
'label' => __('Delivery Company', 'jp4wc-pro'), | |
'description' => __('<br />Please select a shipping company.', 'jp4wc-pro'), | |
'class' => 'jp4wc-delivery-company', | |
'options' => array( | |
'seino' => __( '西濃運輸', 'jp4wc-pro' ), | |
), | |
'value' => ($delivery_company) ? $delivery_company : '' | |
), | |
'jp4wc-tracking-id' => array( | |
'type' => 'text', | |
'id' => 'jp4wc_tracking_id', | |
'label' => __('Tracking Number', 'jp4wc-pro'), | |
'description' => __('Please enter your tracking number.', 'jp4wc-pro'), | |
'class' => 'jp4wc-tracking-id', | |
'value' => ($tracking_id) ? $tracking_id : '' | |
), | |
); | |
return $tracking_fields; | |
} | |
add_filter( 'jp4wc_tracking_fields', 'my_carrier_tracking_fields', $post ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment