Creating Simple Product using WooCommerce CRUD

Creating Simple Product using WooCommerce CRUD

Share this Post:

About Raunak Gupta

I'm an expert Laravel, WooCommerce, WordPress theme and plugin developer, over the time I have developed several sites and applications. I like to help the upcoming developer, So I share my experience through this blog.  

Related Posts:

6 thoughts on “Creating Simple Product using WooCommerce CRUD

  1. vinicius.big@gmail.com'

    Just a comment here!
    the set_options() method gets an array and not a string

    $attribute->set_options([‘XL’]);

    https://docs.woocommerce.com/wc-apidocs/source-class-WC_Product_Attribute.html#157-164

    Reply
  2. fatima@gmail.com'

    Hi, very nice website, cheers!

    Reply
  3. mike@gmail.com'

    How do i set image by its url not id.

    Reply
    • Hi Mike,

      There is no such option to set image by URL, you have to get the ID of that image then you can assign that to a product.

      Reply
  4. chandan.probizrank@gmail.com'

    Well !!!
    I had tried to search how to add a product using woocommerce hook or action or classes /functions but couldn’t found and I was inserting the product though wp_insert_post().but it was not the way and it was added the products but the user couldn’t buy that. after googling many times i have found the solution to proper way of insert the products using woocommerce codex.

    Reply

Leave a Reply to Mike Cancel reply

Your email address will not be published. Required fields are marked *


*