• Hi.
    I want add images to product gallery with code php. But I do not know how.
    Somebody could help me?

    Thank you so much

Viewing 1 replies (of 1 total)
  • Thread Starter leanwitzke

    (@leanwitzke)

    ok, i found the solution in the core of plugin.

    Woocommerce manage field ‘_product_image_gallery’ with id of images separatly for comma.

    $list_id = "444,555";
    update_post_meta($post_id,'_product_image_gallery',$list_id);

    Thanks

    • This reply was modified 9 years, 8 months ago by leanwitzke.
Viewing 1 replies (of 1 total)

The topic ‘Add image to gallery programmatically’ is closed to new replies.