Woocommerce: add an extra option for the backend (like extra SKU or so)

25 Views Asked by At

I am new here and not a tech-savy guy (coding) so please don't be too harsh with me.

I am trying to add an extra field in the products backend, but struggle a lot because I don't understand the coding. I got help from ChatGPT and it works 50%.

What I am trying to accomplish is to have an extra field similar to the SKU field. It has to show in (BACKEND) the product page and in quick edit, for every product. It has to be searchable (in BACKEND) when I search for products.

Right now, my boss is using the SKU field to write the position where the product physically is. So when customers ordering we get printet the order and first description of every product is the SKU field what we have used for the position instead a real SKU number.

It works ... but not ideal. Every time we get a new product or we need to change the position where to physically find the product, we have to edit the SKU.

I would love to make it much easier by having an extra field that behaves like SKU field in terms of editing, searchable and so on.

It is NOT visible for customers on the shop page, but it is on the order we print out.

I would like to show the code ChatGPT got me and some pictures I made because I think it's better to understand then, but I am new here and don't know the rules if it's allowed for a newbie. So thanks in advance and hope to hear from you.

I tried Reddit WooCommerce group and ChatGPT.

I would hope someone could help with the code I got, which doesn't work properly.

0

There are 0 best solutions below