Created
February 15, 2021 06:40
-
-
Save mono96/ece75c66b98389ef3a28ddc6c0da842a to your computer and use it in GitHub Desktop.
jp4wc_tracking_fields フック
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
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( | |
'hoge' => __( 'hoge', 'jp4wc-pro' ), | |
'hogehoge' => __( 'hogehoge', '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