Can’t pass affiliate ID through Woocomerce external product URL

Hi, I would like to pass a shortcode [affiliates_id] as a referrer for woocommerce external (affiliate) products. Unfortunately a shortcode is not properly translated into affiliate ID for products URLs (only when you add it into product URL field, of course it works fine with excerpt and content/product description). Could you please advise how to solve that problem?
Best, Slawek

3 Responses to Can’t pass affiliate ID through Woocomerce external product URL

  1. Slawek December 9, 2013 at 11:29 pm #

    Unfortunately woocommerce (my is 2.0.20) do not use external.php template at all (neither from template directory nor from main plugin directory). I have tried to modify class-wc-product-external.php accordingly, but without any success.

    • antonio December 10, 2013 at 8:11 am #

      Sorry, then you should ask in the WooCommerce support.
      cheers

  2. antonio December 6, 2013 at 10:22 am #

    Hi,
    you could use do_shortcode on woocommerce template. By example on wp-content/woocommerce/templates/single-product/add-to-cart/external.php you can use:
    do_shortcode($product_url)
    and use “www.domain.com/external-product-page.php?affiliates=[affiliates_id]” as external url.
    cheers

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share