Reply 357300 to: Add multiple videos to product gallery along with product images in individual product page

Avatar: Rose Tyler
Rose Tyler
Support staff
May 20, 2023 at 13:12

Hello, @N Nandan,

Thank you for your response.

1/ We use the next function for getting the videos’ ids uploaded for product -> https://prnt.sc/fl3OkxYEC_lD.
Function name: etheme_get_attach_video()
It is located in xstore/framework/woo.php

The main post_meta key for getting the videos ids list is “_product_video_gallery”
Example:
get_post_meta( $post_id, '_product_video_gallery', false )

2/ For those cases, if video was added as iframe code (https://prnt.sc/6g9cNGbiRdxf) we use the next function:
Function name: etheme_get_external_video()
It is located in xstore/framework/woo.php

The main post_meta key for getting the video code is “_product_video_code”
Example:
get_post_meta( $post_id, '_product_video_code', true )

Hope you found the answer useful for you!

Kind Regards,
8theme team

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.