How to Link to a Product, with Auto-Select Variation

This topic has 2 replies, 2 voices, and was last updated 5 hours, 8 minutes ago ago by Andrew Mitchell

  • Avatar: enduratex@gmail.com
    Enduratex
    Participant
    February 27, 2026 at 10:27

    We have a number of pages in our client site that need to link to a product, and have that product page automatically show and load the image for a specific variation.

    For example – on this product:
    https://enduratex.site/product/independence-iii/

    We need to load the page with single variations loaded, like this:
    * https://enduratex.site/product/independence-iii/?attribute_swatch=Cosmos
    * https://enduratex.site/product/independence-iii/?attribute_swatch=Flirty+Fox
    * https://enduratex.site/product/independence-iii/?attribute_swatch=Hope%27s+Pink

    Unfortunately, this doesn’t work, and the variation swatch does not load.
    Is there any other, better way to do this?

    Thank You in Advance!

    1 Answer
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    February 27, 2026 at 10:55

    Hello, Enduratex,

    In WooCommerce, a “deep link” to a specific variation works only through standard attribute parameters, namely:
    – The key should be in the format attribute_{taxonomy}
    – For a global attribute, the taxonomy usually starts with pa_
    – The value should be the term slug, not the label

    In your case:
    – Attribute slug (taxonomy) = pa_swatch
    – Attribute value (term slug) = bronzed-peach

    Therefore, the correct URL should be:
    https://enduratex.site/product/independence-iii/?attribute_pa_swatch=bronzed-peach

    Best regards,
    8Theme Team

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.