function my_custom_checkout_field_process() { global $woocommerce; if (!$_POST['net_id']) { wc_add_notice('<strong>NetID</strong> is required.', $notice_type = 'error'); } else { if (!$_POST['uofrpassword']) { wc_add_notice('<strong>Password</strong> is required.', $notice_type = 'error'); } else { if (validatecredentials($_POST['net_id'], $_POST['uofrpassword']) == false) { //if netid and password are not valid wc_add_notice('<strong>The NetID or password you entered is incorrect. Please try again.</strong>', $notice_type = 'error'); } } } }
$username = $_GET['username']; $password = $_GET['password']; break; case 'PUT': break; case 'POST': $username = $_POST['username']; $password = $_POST['password']; break; case 'DELETE': break; } if (empty($username) || empty($password)) { sendresponse($response, 3, false, $api_response_code); } $user_id = validatecredentials($username, $password); if ($user_id == false) { sendresponse($response, 4, false, $api_response_code); } else { switch ($method) { case 'GET': $sql_select = "SELECT categories.* FROM categories"; $entries = get_categories($sql_select); if ($entries == false) { sendresponse($response, 5, false, $api_response_code); } else { $response['data'] = $entries; } break; case 'PUT': die("update table");