__experimental_woocommerce_blocks_sanitize_additional_field filter-hookWC 8.6.0

Deprecated from version 8.7.0. It is no longer supported and can be removed in future releases. Use woocommerce_sanitize_additional_field instead.

Allow custom sanitization of an additional field.

Usage

add_filter( '__experimental_woocommerce_blocks_sanitize_additional_field', 'wp_kama__experimental_woocommerce_blocks_sanitize_additional_field_filter', 10, 4 );

/**
 * Function for `__experimental_woocommerce_blocks_sanitize_additional_field` filter-hook.
 * 
 * @param mixed  $field_value                                       The value of the field being sanitized.
 * @param string $field_key                                         Key of the field being sanitized.
 * @param        $string                                            
 * @param        $use woocommerce_sanitize_additional_field instead 
 *
 * @return mixed
 */
function wp_kama__experimental_woocommerce_blocks_sanitize_additional_field_filter( $field_value, $field_key, $string, $use woocommerce_sanitize_additional_field instead ){

	// filter...
	return $field_value;
}
$field_value(mixed)
The value of the field being sanitized.
$field_key(string)
Key of the field being sanitized.
$string
-
$use woocommerce_sanitize_additional_field instead
-

Changelog

Since 8.6.0 Introduced.
Deprecated since 8.7.0 Use woocommerce_sanitize_additional_field instead.

Where the hook is called

CheckoutFields::sanitize_field()
__experimental_woocommerce_blocks_sanitize_additional_field
woocommerce/src/Blocks/Domain/Services/CheckoutFields.php 682
$field_value = apply_filters_deprecated( '__experimental_woocommerce_blocks_sanitize_additional_field', array( $field_value, $field_key ), '8.7.0', 'woocommerce_sanitize_additional_field', 'This action has been graduated, use woocommerce_sanitize_additional_field instead.' );

Where the hook is used in WooCommerce

Usage not found.