Photo: Image by freepik
One of the most tedious and laborious things in managing an online store is uploading products. There are many ways to automate product creation in the backend, such as preparing an excel or csv and then running a script, or using plugins like WP All Import (which is really good and I recommend).
But I have always missed one "feature": being able to create products from photos. You see, I am very particular, and I take photos of my products myself, if I don't have images provided by a distributor. And that's the first thing I do.
So, my first step before I start creating products is always to take my photos, arrange them, select them, optimize them and upload them to the WordPress media library.
Do you remember the famous WordPress phrase “There's a plugin for that”? Well, it's true in 99% of cases… but, in this case, precisely, NO.
Once I've uploaded all my photos, I start creating products manually. Every time I save the first draft, I add the title, slug, and category, and then I try to assign the corresponding photo to it.
This first stopper may seem like a lie or an exaggeration, but it seems really annoying to me… Because sometimes I have a hard time finding it! But I need to assign the photo first, because it helps me a lot to visually identify the product in the product list (in the WooCommerce product list, the title of each product is accompanied by a thumbnail).
When I had a store years ago within the TodoColección marketplace (an eBay-type sales website that is very popular in Spain), in its backend they included a very good utility called "Photo Booth", which allowed me to upload batches of photos first, and from the images create the products in a very productive and automated way.
Well, hey, do you remember the famous WordPress phrase “There's a plugin for that”? Well, it's true 99% of the time… but as far as I could find, in this case, NO.
So I say… What if I do it myself? What if I'm lazy and explain the features to my AI development plugin, and it does it for me, and then I fix it a bit?
Well, said and done. I have created a WordPress plugin, which once activated, and its functionality enabled from its settings, automatically creates a product for each file uploaded to the media.
And not only that: I have made it so that they can automatically assign a default category (thus avoiding the cumbersome “Uncategorized”), and as a provisional title for the post or product, it uses the file name.
This is the best part, because if one day you upload t-shirts, and another day, for example, you upload toys, then in each upload batch you leave them in the category they belong in, and you save another step.
Optionally, it may also be useful to add default tags, price, weight and dimensions, or any other taxonomy.
And it leaves it as a draft. What do you think? I have found it extremely useful, sometimes it has made me products from photos that were not really products, or that were for the additional photo gallery. You just delete them and that's it.
I'm creating products at a much faster rate than when I was doing it the other way. Do you like that?
Here you have it:
GITHUB repository: https://github.com/recioRaszak/wp_create_products_from_media
Leave a Reply