How can i give different/custom IDs to the photo gallery of the woocommerce products?

My products get their photo gallery from a different plugin and i have the array of IDs and urls coming from it. like:

Array ( [0] => 4046 [1] => 4047 [2] => 4048 [3] => 4049 )

I just need to tell woocommerce to use these ids instead of its default.

I also tried to copy the original product-image.php and product-thumbnails.php files in to my child theme like this:


but even without modifying them the photo gallery stops working, it seems like that it does not use .js and .css files anymore.

Can you please tell me what is the right way to tell the woocommerce product photo gallery to use a different array of IDs ?