我正在Woocommerce商店中设置运输方式,但是我缺少的一件事是运输方式徽标?
我发现了一种通过基于重量的运输类向运输方法添加自定义字段的方法,但是如何处理在那里上传的徽标?我使用ACF(高级自定义字段),您可以将这些字段放在运输方式上吗?如果不是,如何使用PHP?
public function init_form_fields() {
$settings = array(
'title' => array(
'title' => __('Metodetittel', 'mystore'),
'type' => 'text',
'description' => __('Dette er det kunden ser i handlekurven.', 'mystore'),
'default' => __('Vektbasert fraktmetode', 'mystore'),
'desc_tip' => true
),
'cost' => array(
'title' => __('Cost', 'woocommerce'),
'type' => 'text',
'placeholder' => '',
'description' => '',
'default' => '',
'desc_tip' => true
),
'min_weight' => array(
'title' => __('Minimum vekt (g)', 'mystore'),
'type' => 'text',
'placeholder' => '',
'description' => '',
'default' => '',
'desc_tip' => true
),
'max_weight' => array(
'title' => __('Max vekt (g)', 'mystore'),
'type' => 'text',
'placeholder' => '',
'description' => '',
'default' => '',
'desc_tip' => true
)
);
$this->instance_form_fields = $settings;
}
我希望能够上传运输选项的徽标,例如UPS,Fedex等。