WordPress at a glance
filter is not described

woocommerce_admin_settings_sanitize_option_(option) filter-hook . WC 2.4.0

Sanitize the value of an option by option name.

Usage

add_filter( 'woocommerce_admin_settings_sanitize_option_(option)', 'filter_function_name_7894', 10, 3 );
function filter_function_name_7894( $value, $option, $raw_value ){
	// filter...

	return $value;
}
$value
-
$option
-
$raw_value
-

Changelog

Since 2.4.0 Introduced.

Where the hook is called

WC_Admin_Settings::save_fields()
woocommerce_admin_settings_sanitize_option_(option)
woocommerce/includes/admin/class-wc-admin-settings.php 829
$value = apply_filters( "woocommerce_admin_settings_sanitize_option_$option_name", $value, $option, $raw_value );

Where in WP core the hook is used WooCommerce

woocommerce/includes/wc-formatting-functions.php 1133
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_price_decimal_sep', 'wc_format_option_price_separators', 10, 3 );
woocommerce/includes/wc-formatting-functions.php 1509
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_orders_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1515
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_lost_password_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1514
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_payment_methods_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1513
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_edit_address_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1512
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_edit_account_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1511
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_downloads_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1510
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_view_order_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1508
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_set_default_payment_method_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1134
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_price_thousand_sep', 'wc_format_option_price_separators', 10, 3 );
woocommerce/includes/wc-formatting-functions.php 1507
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_delete_payment_method_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1506
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_myaccount_add_payment_method_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1505
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_checkout_order_received_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1504
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_checkout_pay_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );
woocommerce/includes/wc-formatting-functions.php 1171
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_hold_stock_minutes', 'wc_format_option_hold_stock_minutes', 10, 3 );
woocommerce/includes/wc-formatting-functions.php 1148
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_price_num_decimals', 'wc_format_option_price_num_decimals', 10, 3 );
woocommerce/includes/wc-formatting-functions.php 1516
add_filter( 'woocommerce_admin_settings_sanitize_option_woocommerce_logout_endpoint', 'wc_sanitize_endpoint_slug', 10, 1 );