• What is the exact code you need to manually construct a link for an external affiliate product so that this plugin will cloak it?

Viewing 1 replies (of 1 total)
  • Plugin Author datafeedr

    (@datafeedrcom)

    You first need a WC_Product_External object.

    Then you need to call the get_product_url() method on that object.

    <?php
    $product = wc_get_product(123);
    echo $product->get_product_url();
    
    • This reply was modified 7 years, 5 months ago by datafeedr.
    • This reply was modified 7 years, 5 months ago by datafeedr.
Viewing 1 replies (of 1 total)

The topic ‘How to construct a link manually?’ is closed to new replies.