woocommerce_checkout_required_field_notice filter-hookWC 1.0

translators: %s: field name

Usage

add_filter( 'woocommerce_checkout_required_field_notice', 'wp_kama_woocommerce_checkout_required_field_notice_filter', 10, 3 );

/**
 * Function for `woocommerce_checkout_required_field_notice` filter-hook.
 * 
 * @param  $sprintf     
 * @param  $field_label 
 * @param  $key         
 *
 * @return 
 */
function wp_kama_woocommerce_checkout_required_field_notice_filter( $sprintf, $field_label, $key ){

	// filter...
	return $sprintf;
}
$sprintf
-
$field_label
-
$key
-

Where the hook is called

WC_Checkout::validate_posted_data()
woocommerce_checkout_required_field_notice
woocommerce/includes/class-wc-checkout.php 907
$errors->add( $key . '_required', apply_filters( 'woocommerce_checkout_required_field_notice', sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . esc_html( $field_label ) . '</strong>' ), $field_label, $key ), array( 'id' => $key ) );

Where the hook is used in WooCommerce

Usage not found.