Upload File in My Account Registration Form
How to upload profile picture or any file during WooCommerce My Account Registration? For uploading file from WooCommerce My Account Registration form we need to set form enctype type To multipart/form-data.secondly , we need to add html tags for input type file to upload file. then we need to validate them if the field field is required.Finally after upload file enter media id to user meta. For uploading files may be image or other files in WooCommerce Registration form. We should follow these steps Make form enctype type To multipart/form-data We have to add html of input type file in form Than we have to validate these fields Than Finally Upload File and save field to User meta Step 1 : We have to use ‘woocommerce_register_form_tag’ Hook. // Add enctype to form to allow file upload function AddEnctypeCustomRegistrationForms() { echo ‘enctype=”multipart/form-data”‘; } add_action(‘woocommerce_register_form_tag’,’AddEnctypeCustomRegistrationForms’); Step 2 :