Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/299.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 带有显示选项的If-Else的下拉自定义字段_Php_Wordpress_Advanced Custom Fields - Fatal编程技术网

Php 带有显示选项的If-Else的下拉自定义字段

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',

大家好,我有麻烦了

我想问您如何为以下功能字段的每个选项生成1个条件代码\u客户:

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(' ..');
}


我需要知道这样做的方法,因为我试图展示客户在网页签出中选择的每个条件的过滤器

您找到解决方案了吗?