WC_Settings_API::validate_checkbox_field( string $key, string $value )

Validate Checkbox Field.


Description Description

If not set, return "no", otherwise return "yes".


Parameters Parameters

$key

(Required) Field key.

$value

(Required) Posted Value.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-settings-api.php

	public function validate_checkbox_field( $key, $value ) {
		return ! is_null( $value ) ? 'yes' : 'no';
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.