Custom field creation checkout
-
Hi,
I am trying to create custom field after order notes. But it is not working and showing in the frontend.
// file upload field
function custom_checkout_file_upload( $checkout ) {
echo '<div id="checkout_field"><h2>' . __('Upload') . '</h2>';
woocommerce_form_field( 'file_upload', array(
'type' => 'file',
'class' => array('form-row-wide'),
'label' => __('Upload File'),
'required' => true,
), $checkout->get_value( 'file_upload' ) );
echo '</div>';
}
add_action( 'woocommerce_after_order_notes', 'custom_checkout_file_upload' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom field creation checkout’ is closed to new replies.