Conversation
supportHi. Is it possible to call the cloaked URL on a custom button we made – or what is the exact phrase? For example : The external URL field in a Woo product is called by ‘_product_url’. Best / Sascha
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!
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! 🙂
Try this code: https://datafeedrapi.helpscoutdocs.com/article/166-open-buy-now-links-in-new-window
In our special setup that code don´t seem to work. We´ll manage this otherwise. Thx!
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!
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! 🙂
Try this code: https://datafeedrapi.helpscoutdocs.com/article/166-open-buy-now-links-in-new-window
In our special setup that code don´t seem to work. We´ll manage this otherwise. Thx!