mardi 23 juin 2020

Checkout Field Editor plugin filter hook to set custom display rules for checkout fields

I have just purchased the plugin Checkout Field Editor for WooCommerce from Theme High. I need to create a custom display rule condition for fields. They provide the filters hook:

apply_filters( 'thwcfe_show_field', $show, $field_name );

I have tried the following code, but it does not work. Can someone help?

function display( $field_name='test' ) { 
    $show =true; 
    return $show; 
}
add_filter('thwcfe_show_field', 'display');

The true / false options works but I can't make it specific to the $field_name = 'test'.

Aucun commentaire:

Enregistrer un commentaire