WC_Shop_Customizer::sanitize_archive_display()publicWC 1.0

Sanitize the shop page & category display setting.

Method of the class: WC_Shop_Customizer{}

No Hooks.

Return

String.

Usage

$WC_Shop_Customizer = new WC_Shop_Customizer();
$WC_Shop_Customizer->sanitize_archive_display( $value );
$value(string) (required)
'', 'subcategories', or 'both'.

WC_Shop_Customizer::sanitize_archive_display() code WC 9.4.2

public function sanitize_archive_display( $value ) {
	$options = array( '', 'subcategories', 'both' );

	return in_array( $value, $options, true ) ? $value : '';
}