woocommerce_wp_hidden_input()
Output a hidden input box.
No Hooks.
Return
null
. Nothing (null).
Usage
woocommerce_wp_hidden_input( $field, ?WC_Data $data );
- $field(array) (required)
- Field data.
- ?WC_Data $data **
- -
Default: null
woocommerce_wp_hidden_input() woocommerce wp hidden input code WC 9.6.1
function woocommerce_wp_hidden_input( $field, ?WC_Data $data = null ) { global $post; $field['value'] = isset( $field['value'] ) ? $field['value'] : OrderUtil::get_post_or_object_meta( $post, $data, $field['id'], true ); $field['class'] = isset( $field['class'] ) ? $field['class'] : ''; echo '<input type="hidden" class="' . esc_attr( $field['class'] ) . '" name="' . esc_attr( $field['id'] ) . '" id="' . esc_attr( $field['id'] ) . '" value="' . esc_attr( $field['value'] ) . '" /> '; }