Calling custom PHP from a HTML form post action gives 404 error
Add unique field in your form. Eg: <input type=”hidden” name=”wdm_action” value=”1″> Put your ‘customer-details.php’ file code in below function:- add_action(‘template_redirect’,’wdm_customer_details’){ //check if that field present in the form, if yes then perform the action if(isset($_POST[‘wdm_action’] && $_POST[‘wdm_action’] != ”){ //customer-details.php file code } }