Title: Custom Button Call
Last modified: November 21, 2020

---

# Custom Button Call

 *  Resolved [shenom](https://wordpress.org/support/users/shenom/)
 * (@shenom)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/custom-button-call/)
 * Hi.
 * 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

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [datafeedr](https://wordpress.org/support/users/datafeedrcom/)
 * (@datafeedrcom)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/custom-button-call/#post-13700032)
 * 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](https://wordpress.org/support/users/shenom/)
 * (@shenom)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/custom-button-call/#post-13760650)
 * 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! 🙂
 *  Plugin Author [datafeedr](https://wordpress.org/support/users/datafeedrcom/)
 * (@datafeedrcom)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/custom-button-call/#post-13760657)
 * Try this code: [https://datafeedrapi.helpscoutdocs.com/article/166-open-buy-now-links-in-new-window](https://datafeedrapi.helpscoutdocs.com/article/166-open-buy-now-links-in-new-window)
 *  Thread Starter [shenom](https://wordpress.org/support/users/shenom/)
 * (@shenom)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/custom-button-call/#post-13770726)
 * In our special setup that code don´t seem to work. We´ll manage this otherwise.
 * Thx!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom Button Call’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-cloak-affiliate-links.
   svg)
 * [Cloak Affiliate Links for WooCommerce](https://wordpress.org/plugins/woocommerce-cloak-affiliate-links/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-cloak-affiliate-links/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/)

## Tags

 * [external](https://wordpress.org/support/topic-tag/external/)
 * [target_blank](https://wordpress.org/support/topic-tag/target_blank/)

 * 4 replies
 * 2 participants
 * Last reply from: [shenom](https://wordpress.org/support/users/shenom/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/custom-button-call/#post-13770726)
 * Status: resolved