Php 带有显示选项的If-Else的下拉自定义字段
大家好,我有麻烦了 我想问您如何为以下功能字段的每个选项生成1个条件代码\u客户:Php 带有显示选项的If-Else的下拉自定义字段,php,wordpress,advanced-custom-fields,Php,Wordpress,Advanced Custom Fields,大家好,我有麻烦了 我想问您如何为以下功能字段的每个选项生成1个条件代码\u客户: function field_cliente( $fields) { $fields['billing']['billing_cliente'] = array ( 'label' => __('Tipo di Cliente', 'woocommerce'), 'id' => '_select', 'type' => 'select',
function field_cliente( $fields) {
$fields['billing']['billing_cliente'] = array (
'label' => __('Tipo di Cliente', 'woocommerce'),
'id' => '_select',
'type' => 'select',
'options' => array (
'default' => __( 'Seleziona', 'woocommerce' ),
'one' => __( 'Privato', 'woocommerce' ),
'two' => __( 'Azienda', 'woocommerce' ),
'three' => __( 'Impresa Individuale', 'woocommerce' )
)
);
return $fields;
}
例如:
If "One" {
add_filter(' ..');
etc...
}
if "Two" {
add_filter(' ..');
}
我需要知道这样做的方法,因为我试图展示客户在网页签出中选择的每个条件的过滤器您找到解决方案了吗?