WC_Admin_Menus::set_screen_option()publicWC 1.0

Validate screen options on update.

Method of the class: WC_Admin_Menus{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Admin_Menus = new WC_Admin_Menus();
$WC_Admin_Menus->set_screen_option( $status, $option, $value );
$status(true|false|int) (required)
Screen option value.
Default: false to skip
$option(string) (required)
The option name.
$value(int) (required)
The number of rows to use.

WC_Admin_Menus::set_screen_option() code WC 8.7.0

public function set_screen_option( $status, $option, $value ) {
	$screen_options = array(
		'woocommerce_keys_per_page',
		'woocommerce_webhooks_per_page',
		FileListTable::PER_PAGE_USER_OPTION_KEY,
		SearchListTable::PER_PAGE_USER_OPTION_KEY,
		WC_Admin_Log_Table_List::PER_PAGE_USER_OPTION_KEY,
	);

	if ( in_array( $option, $screen_options, true ) ) {
		return $value;
	}

	return $status;
}