array( $this, 'sanitize_yesno' ), ) ); } /** * Sanitize "yes" / "no". * * @param mixed $value Raw input. * @return string Sanitized "yes" or "no". */ public function sanitize_yesno( $value ) { return ( 'yes' === $value ) ? 'yes' : 'no'; } /** * Render the settings page. */ public function render_settings_page() { if ( ! current_user_can( 'manage_options' ) ) { return; } $wc_statuses = function_exists( 'wc_get_order_statuses' ) ? wc_get_order_statuses() : array(); ?>