Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
WC_Settings_API
validate_checkbox_field
WC_Settings_API::validate_checkbox_field PHP Method
WC_Settings_API Class Documentation
Show file
Open project: woocommerce/woocommerce
validate_checkbox_field()
public
method
If not set, return "no", otherwise return "yes".
public
validate_checkbox_field
(
string
$key
,
string
|
null
$value
) :
string
$key
string
$value
string
|
null
Posted Value
return
string
public function validate_checkbox_field($key, $value) { return !is_null($value) ? 'yes' : 'no'; }
WC_Settings_API
add_error
admin_options
display_errors
format_settings
generate_checkbox_html
generate_color_html
generate_decimal_html
generate_multiselect_html
generate_password_html
generate_price_html
generate_select_html
generate_settings_html
generate_text_html
generate_textarea_html
generate_title_html
get_custom_attribute_html
get_description_html
get_errors
get_field_default
get_field_key
get_field_type
get_field_value
get_form_fields
get_option
get_option_key
get_post_data
get_tooltip_html
init_form_fields
init_settings
process_admin_options
set_defaults
set_post_data
validate_checkbox_field
validate_decimal_field
validate_multiselect_field
validate_password_field
validate_price_field
validate_select_field
validate_settings_fields
validate_text_field
validate_textarea_field