Sorry for the late reply…
You’ll need to use the get_product_url() method in order to get the cloaked URL for an external WooCommerce product.
Something like this: $product->get_product_url();
Hope this helps!
Thread Starter
shenom
(@shenom)
Now – I´m late as well. 🙂
Thank You for Your help!
This would be one way. An other to help out…
Would You consider to implement a small extra feature that let the user choose to open these external links in a new tab? I don´t now why Woo don´t listen and implement this feature years ago. Also – it would safe us from installing another plugin. What – in my case – didn´t work. I´ve also tried some PHP codes – that don´t work as well.
I´ve seen a lot of affiliate / cloaking plugins that have this feature. It´s the right place for it! 🙂
Thread Starter
shenom
(@shenom)
In our special setup that code don´t seem to work. We´ll manage this otherwise.
Thx!