The basic idea of the plugin is to show a random code after the users have completed the payment request and receive the default mail from woocommerce about the confirmation of the purchase, also we need to add a filed
Book Code: hdf-sas-saw
The plugin will work like this.
If we add a new contect on the plugin it will have 6 fields : Book Name, ISBN, File, File Size, Codes Uploaded, Codes Used
We will prepare an excel file with 4000 Codes (like this XXX-XXX-XXX, raandom) inside.
We will create a new content inside the plugin and upload this excel file with the codes.
If we go to products on Woocommerce, we will add a new book, and if i chose Virtual it will show a new field called Book Codes. If we click it will will show the name of the content that we have added at the plugin (Lest say the book names ti will be shown.)
We chose the book codes that we want to use in this product.
The shop will sell books, the books will be virtual or regular.
If a user want to buy a virtual book he will receive a code from excel file that we have uploaded at the plugin (1 code per user). After the mail is send to the user with the book code, at the plugin page at that book the Codes Used it will show how many codes are sended.
That is the basic idea.