How to intercept a file from the Woocommerce plugin


Please help solve the problem.

Woocommerce plugin has file connection related.php –
https://github.com/woocommerce/woocommerce/blob/527a7261bd0ad1f4ba1d8eb2f82a96f53867b715/includes/wc-template-functions.php#L1925

This file is responsible for displaying similar products on the product card. As far as I remember, the file itself can be changed in the topic by creating it /woocommerce/single-product/related.php Folder in the root of the template

But my job is to intercept this file and forward it to my plugin. Even if we create the subject /woocommerce/single-product/related.php in the subject line, the priority should still be with me and redirect to my file.

Please let me know or show an example of how I can intercept this file https://github.com/woocommerce/woocommerce/blob/527a7261bd0ad1f4ba1d8eb2f82a96f53867b715/includes/wc-template-functions.php#L1925 to get it from another Source off works.